Commit 97824328 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Close a connection to a node notified as DOWN.

This fix an issue where a client was notified down, dropped from node
manager then detected as disconnected: the node was not found.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2111 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 79648795
......@@ -461,7 +461,11 @@ class NodeManager(object):
if state == NodeStates.DOWN:
logging.debug('droping node %r, found with %s %s %s %s',
node, *log_args)
self.remove(node)
if node.isConnected():
# cut this connection, node removed by handler
node.getConnection().close()
else:
self.remove(node)
else:
logging.debug('updating node %r to %s %s %s %s',
node, *log_args)
......
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