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

storage: safely change connection peer id temporarily

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