Grokzen / redis-py-cluster

Python cluster client for the official redis cluster. Redis 3.0+.
https://redis-py-cluster.readthedocs.io/
MIT License
1.1k stars 316 forks source link

Do not attempt to disconnect if there's no connection #472

Open FranGM opened 2 years ago

FranGM commented 2 years ago

This is another case of https://github.com/Grokzen/redis-py-cluster/issues/453 . I'm not sure I have the ability to reopen issues but this should be the fix.

There are cases in which we can get a BaseException before we have established a connection, which means that attempting to disconnect from it will result in an unhandled exception.