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 7b6fff4 commit eff9108Copy full SHA for eff9108
neo4j/v1/session.py
@@ -140,7 +140,7 @@ def recycle(self, session):
140
:return:
141
"""
142
pool = self.session_pool
143
- for s in pool:
+ for s in list(pool): # freezing the pool into a list for iteration allows pool mutation inside the loop
144
if not s.healthy:
145
pool.remove(s)
146
if session.healthy and len(pool) < self.max_pool_size and session not in pool:
0 commit comments