You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def release(self, connection):
self._checkpid()
with self._lock:
try:
self._in_use_connections.remove(connection)
except KeyError:
pass
if self.owns_connection(connection):
self._available_connections.append(connection)
else:
# pool doesn't own this connection. do not add it back
# to the pool and decrement the count so that another
# connection can take its place if needed
self._created_connections -= 1
connection.disconnect()
return
Since you don't own this connection, it means that the program has been fork, and _created_connections has been initialized to 0, why subtract 1 again?Can someone explain it to me?,thanks
The text was updated successfully, but these errors were encountered:
https://github.com/redis/redis-py/blob/master/redis/connection.py#L1515
Since you don't own this connection, it means that the program has been fork, and _created_connections has been initialized to 0, why subtract 1 again?Can someone explain it to me?,thanks
The text was updated successfully, but these errors were encountered: