Commit 5c8f9e14 authored by Vincent Pelletier's avatar Vincent Pelletier

fixup! Automatically set UUID on connection when setting it on node.

parent 5fc18f1f
...@@ -44,7 +44,7 @@ class IdentificationHandler(EventHandler): ...@@ -44,7 +44,7 @@ class IdentificationHandler(EventHandler):
from .client import ClientOperationHandler from .client import ClientOperationHandler
handler = ClientOperationHandler handler = ClientOperationHandler
if node is None: if node is None:
node = app.nm.createClient() node = app.nm.createClient(uuid=uuid)
elif node.isConnected(): elif node.isConnected():
# cut previous connection # cut previous connection
node.getConnection().close() node.getConnection().close()
...@@ -61,9 +61,7 @@ class IdentificationHandler(EventHandler): ...@@ -61,9 +61,7 @@ class IdentificationHandler(EventHandler):
raise ProtocolError('reject non-client-or-storage node') raise ProtocolError('reject non-client-or-storage node')
# apply the handler and set up the connection # apply the handler and set up the connection
handler = handler(self.app) handler = handler(self.app)
conn.setUUID(uuid)
conn.setHandler(handler) conn.setHandler(handler)
node.setUUID(uuid)
node.setConnection(conn) node.setConnection(conn)
args = (NodeTypes.STORAGE, app.uuid, app.pt.getPartitions(), args = (NodeTypes.STORAGE, app.uuid, app.pt.getPartitions(),
app.pt.getReplicas(), uuid) app.pt.getReplicas(), uuid)
......
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