diff --git a/CHANGES b/CHANGES index 8cfc47db18..bcdd6682d7 100644 --- a/CHANGES +++ b/CHANGES @@ -55,6 +55,7 @@ * Fix for Unhandled exception related to self.host with unix socket (#2496) * Improve error output for master discovery * Make `ClusterCommandsProtocol` an actual Protocol + * Fix ConnectionPool deadlock triggered by gc * 4.1.3 (Feb 8, 2022) * Fix flushdb and flushall (#1926) diff --git a/redis/connection.py b/redis/connection.py index b39ba28f76..57d933f02a 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -1008,7 +1008,7 @@ def __repr__(self) -> (str, str): ) def reset(self) -> None: - self._lock = threading.Lock() + self._lock = threading.RLock() self._created_connections = 0 self._available_connections = [] self._in_use_connections = set()