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

Fix handling of notifyNodeInformation in client side.

Cut the connection to non-running nodes and remove it from pool in case of storage nodes.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1620 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6755bd49
......@@ -149,17 +149,15 @@ class PrimaryNotificationsHandler(BaseHandler):
app = self.app
self.app.nm.update(node_list)
for node_type, addr, uuid, state in node_list:
if node_type != NodeTypes.STORAGE \
or state != NodeStates.RUNNING:
continue
# close connection to this node if no longer running
conn = self.app.em.getConnectionByUUID(uuid)
if conn is not None:
conn.close()
if node_type == NodeTypes.STORAGE:
# Remove from pool connection
app.cp.removeConnection(conn)
self.dispatcher.unregister(conn)
if state != NodeStates.RUNNING:
# close connection to this node if no longer running
conn = self.app.em.getConnectionByUUID(uuid)
if conn is not None:
conn.close()
if node_type == NodeTypes.STORAGE:
# Remove from pool connection
app.cp.removeConnection(conn)
self.dispatcher.unregister(conn)
class PrimaryAnswersHandler(AnswerBaseHandler):
""" Handle that process expected packets from the primary master """
......
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