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 connection is none #454

Closed FranGM closed 3 years ago

FranGM commented 3 years ago

When handling a ConnectionError we could be faced with the situation that we still don't have a connection, so attempting to disconnect would result in an error. To prevent this, we first check if the connection is None before attempting to disconnect.

Fixes https://github.com/Grokzen/redis-py-cluster/issues/453