diff --git a/aredis/pool.py b/aredis/pool.py index 1fbb2cc7..7223c32e 100644 --- a/aredis/pool.py +++ b/aredis/pool.py @@ -419,8 +419,8 @@ def release(self, connection): # discard connection with unread response if connection.awaiting_response: 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']): + # reduce node connection count in case of too many connections error raised + 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(connection)