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):
if conn.isClosed():
continue
orig_msg_id = conn.getPeerId()
conn.setPeerId(msg_id)
some_callable(conn, *args)
conn.setPeerId(orig_msg_id)
try:
conn.setPeerId(msg_id)
some_callable(conn, *args)
finally:
conn.setPeerId(orig_msg_id)
def logQueuedEvents(self):
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