We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75cac31 commit eeb8aedCopy full SHA for eeb8aed
redis/connection.py
@@ -1540,10 +1540,10 @@ def release(self, connection: "Connection") -> None:
1540
AfterConnectionReleasedEvent(connection)
1541
)
1542
else:
1543
- # pool doesn't own this connection. do not add it back
1544
- # to the pool and decrement the count so that another
1545
- # connection can take its place if needed
1546
- self._created_connections -= 1
+ # Pool doesn't own this connection, do not add it back
+ # to the pool.
+ # The created connections count shouls not be changed,
+ # because the connection was not created by the pool.
1547
connection.disconnect()
1548
return
1549
0 commit comments