Skip to content

Commit d000b16

Browse files
committed
Moved self._lock initialisation to Pool constructor
1 parent 49e434e commit d000b16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,7 @@ def __init__(
13781378
# will notice the first thread already did the work and simply
13791379
# release the lock.
13801380
self._fork_lock = threading.Lock()
1381+
self._lock = threading.Lock()
13811382
self.reset()
13821383

13831384
def __repr__(self) -> (str, str):
@@ -1395,7 +1396,6 @@ def get_protocol(self):
13951396
return self.connection_kwargs.get("protocol", None)
13961397

13971398
def reset(self) -> None:
1398-
self._lock = threading.Lock()
13991399
self._created_connections = 0
14001400
self._available_connections = []
14011401
self._in_use_connections = set()

0 commit comments

Comments
 (0)