Commit 1a330a1d authored by Vincent Pelletier's avatar Vincent Pelletier

Don't restart a complete connection to primary master when...

Don't restart a complete connection to primary master when requestNodeIdentification fails (for example if master is not ready).


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@747 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5f6ca700
......@@ -406,6 +406,7 @@ class Application(object):
logging.info('connected to a primary master node')
# Identify to primary master and request initial data
while conn.getUUID() is None:
conn.lock()
try:
p = protocol.requestNodeIdentification(CLIENT_NODE_TYPE,
......@@ -415,6 +416,8 @@ class Application(object):
finally:
conn.unlock()
self._waitMessage(conn, msg_id, handler=self.primary_bootstrap_handler)
if conn.getUUID() is None:
time.sleep(5)
if self.uuid != INVALID_UUID:
# TODO: pipeline those 2 requests
# This is currently impossible because _waitMessage can only
......
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