Skip to content

Commit

Permalink
Ensure connection count is always decremented when disconnecting
Browse files Browse the repository at this point in the history
Derived from NoneGG/aredis#194
  • Loading branch information
alisaifee committed Jan 17, 2022
1 parent 34f90a9 commit 3408847
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions coredis/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,7 @@ def release(self, connection):
connection.disconnect()
# reduce node connection count in case of too many connection error raised

if (
self.max_connections_per_node
and self._created_connections_per_node.get(connection.node["name"])
):
if self._created_connections_per_node.get(connection.node["name"]):
self._created_connections_per_node[connection.node["name"]] -= 1
else:
self._available_connections.setdefault(connection.node["name"], []).append(
Expand Down

0 comments on commit 3408847

Please sign in to comment.