Skip to content

Commit 1f41a1d

Browse files
committed
Fix neo4j#796: connection pool clogging up
The reservation count was also increased if the pool was full and the reserveration would never be turned into a new connection. This lead to the pool clogging up after a while.
1 parent 2ecc490 commit 1f41a1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

neo4j/io/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,9 @@ def connection_creator():
756756
+ self.connections_reservations[address])
757757
can_create_new_connection = (infinite_pool_size
758758
or pool_size < max_pool_size)
759-
self.connections_reservations[address] += 1
760-
if can_create_new_connection:
761-
return connection_creator
759+
if can_create_new_connection:
760+
self.connections_reservations[address] += 1
761+
return connection_creator
762762

763763
def _acquire(self, address, deadline):
764764

0 commit comments

Comments
 (0)