Commit aa21ed33 authored by Aurel's avatar Aurel

do not failed in peerBroken method if node does not exist


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@257 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 95eaa500
......@@ -73,10 +73,11 @@ class ElectionEventHandler(MasterEventHandler):
addr = conn.getAddress()
node = app.nm.getNodeByServer(addr)
if isinstance(conn, ClientConnection):
if node is not None:
node.setState(DOWN_STATE)
app.negotiating_master_node_set.discard(addr)
else:
if node.getUUID() is not None:
if node is not None and node.getUUID() is not None:
node.setState(BROKEN_STATE)
MasterEventHandler.peerBroken(self, conn)
......@@ -237,7 +238,6 @@ class ElectionEventHandler(MasterEventHandler):
continue
info = n.getServer() + (n.getUUID() or INVALID_UUID,)
known_master_list.append(info)
p = Packet()
p.answerPrimaryMaster(packet.getId(), primary_uuid, known_master_list)
conn.addPacket(p)
......
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