Commit 43e5d4ba authored by Julien Muchembled's avatar Julien Muchembled

client: fix assertion when storage is shut down

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2772 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 0d7f37ee
......@@ -126,9 +126,10 @@ class PrimaryNotificationsHandler(BaseHandler):
def notifyNodeInformation(self, conn, node_list):
nm = self.app.nm
nm.update(node_list)
# XXX: 'update' automatically closes DOWN nodes. Do we really want
# to do the same thing for nodes in other non-running states ?
for node_type, addr, uuid, state in node_list:
if state != NodeStates.RUNNING:
# close connection to this node if no longer running
node = nm.getByUUID(uuid)
if node and node.isConnected():
node.getConnection().close()
......
......@@ -59,6 +59,7 @@ class StorageBootstrapHandler(AnswerBaseHandler):
assert node is not None, conn.getAddress()
conn.setUUID(uuid)
node.setUUID(uuid)
node.setConnection(conn)
class StorageAnswersHandler(AnswerBaseHandler):
""" Handle all messages related to ZODB operations """
......
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