Commit 73281ff8 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix: Disallow multiple connections from client to storage

Keep lock around _initNodeConnection() in connection pool to avoid concurrent
connections to the same storage node.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2134 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9b4ca06b
......@@ -106,15 +106,8 @@ class ConnectionPool(object):
# must drop some unused connections
self._dropConnections()
self.connection_lock_release()
try:
conn = self._initNodeConnection(node)
finally:
self.connection_lock_acquire()
if conn is None:
return None
if conn is not None:
self.connection_dict[node.getUUID()] = conn
return conn
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment