Skip to content
Snippets Groups Projects
Commit 251078ed authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed bug with shutdown on RpcProtocol.

parent 3b5bd3f9
No related branches found
No related tags found
No related merge requests found
......@@ -55,16 +55,10 @@ class RpcProtocol(object):
def shutdown(self):
# Release all waiting calls from this rpc:
for cid, call in self._calls.iteritems():
for cid in self._calls:
err = {'exception': 'RpcError',
'message': 'Connection reset by peer'}
if 'event' in call:
call['error'] = err
call['return'] = None
call['event'].set()
else:
msg = {'id': cid, 'error': err, 'return': None}
self._manager.signal_arrival(msg)
self._handle_response({'id': cid, 'return': None, 'error': err})
# Execute on_disconnect callback:
callback = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment