Commit 4a93787c authored by Grégory Wisniewski's avatar Grégory Wisniewski

Handle multiple incoming connections from client with crashing.

If a client connect to a storage more than one time, cut the old connection
and replace it by the new one. This is required if the client reconnect to
fast and the storage handle in single poll loop the new connection *then*
the lost of the previous connection.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2195 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent cc0098b4
......@@ -45,6 +45,10 @@ class IdentificationHandler(EventHandler):
handler = ClientOperationHandler
if node is None:
node = app.nm.createClient()
elif node.isConnected():
# cut previous connection
node.getConnection().close()
node.onConnectionClosed()
node.setRunning()
elif node_type == NodeTypes.STORAGE:
from neo.storage.handlers.storage import StorageOperationHandler
......
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