Commit 251078ed authored by Antoine Millet's avatar Antoine Millet

Fixed bug with shutdown on RpcProtocol.

parent 3b5bd3f9
......@@ -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
......
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