Commit cded9e93 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix r2026: use addresses to tell if we got the answer from the primary.

conn.getUUID() will always return None on a not-identified-yet node, so
the test was always false when a  was given.
Also, test app.primary_master_node for None instead of primary_uuid, as
the case where an unknown primary UUID is received must be handled.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2030 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 297af16a
......@@ -147,7 +147,9 @@ class ClientElectionHandler(MasterHandler):
app.unconnected_master_node_set.clear()
app.negotiating_master_node_set.clear()
if (primary_uuid is None or conn.getUUID() == primary_uuid) and \
primary_node = app.primary_master_node
if (primary_node is None or \
conn.getAddress() == primary_node.getAddress()) and \
not conn.isClosed():
# Request a node identification.
# There are 3 cases here:
......
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