Commit bb077977 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not call "ask" on a connection we just closed.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@756 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 2ae0285c
......@@ -125,6 +125,7 @@ class BootstrapEventHandler(StorageEventHandler):
def handleAnswerPrimaryMaster(self, conn, packet, primary_uuid,
known_master_list):
closed = False
app = self.app
# Register new master nodes.
for ip_address, port, uuid in known_master_list:
......@@ -154,6 +155,7 @@ class BootstrapEventHandler(StorageEventHandler):
else:
app.trying_master_node = None
conn.close()
closed = True
else:
if app.primary_master_node is not None:
# The primary master node is not a primary master node
......@@ -162,7 +164,9 @@ class BootstrapEventHandler(StorageEventHandler):
app.trying_master_node = None
conn.close()
p = protocol.requestNodeIdentification(STORAGE_NODE_TYPE, app.uuid,
app.server[0], app.server[1], app.name)
conn.ask(p)
closed = True
if not closed:
p = protocol.requestNodeIdentification(STORAGE_NODE_TYPE, app.uuid,
app.server[0], app.server[1], app.name)
conn.ask(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