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 05e3094 commit 761b7e3Copy full SHA for 761b7e3
redis/connection.py
@@ -1533,10 +1533,10 @@ def release(self, connection: "Connection") -> None:
1533
AfterConnectionReleasedEvent(connection)
1534
)
1535
else:
1536
- # pool doesn't own this connection. do not add it back
1537
- # to the pool and decrement the count so that another
1538
- # connection can take its place if needed
1539
- 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.
1540
connection.disconnect()
1541
return
1542
0 commit comments