Commit 95fecbfb authored by Julien Muchembled's avatar Julien Muchembled

storage: safely change connection peer id temporarily

parent 192b2ba8
...@@ -363,9 +363,11 @@ class Application(object): ...@@ -363,9 +363,11 @@ class Application(object):
if conn.isClosed(): if conn.isClosed():
continue continue
orig_msg_id = conn.getPeerId() orig_msg_id = conn.getPeerId()
conn.setPeerId(msg_id) try:
some_callable(conn, *args) conn.setPeerId(msg_id)
conn.setPeerId(orig_msg_id) some_callable(conn, *args)
finally:
conn.setPeerId(orig_msg_id)
def logQueuedEvents(self): def logQueuedEvents(self):
if self.event_queue is None: if self.event_queue is None:
......
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