From 251078ed1078412df5fdc6233e4c5bdae1648bad Mon Sep 17 00:00:00 2001 From: Antoine Millet Date: Mon, 12 Sep 2011 10:55:36 +0200 Subject: [PATCH] Fixed bug with shutdown on RpcProtocol. --- sjrpc/core/protocols/rpc.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sjrpc/core/protocols/rpc.py b/sjrpc/core/protocols/rpc.py index d6e33dc..1b8b614 100644 --- a/sjrpc/core/protocols/rpc.py +++ b/sjrpc/core/protocols/rpc.py @@ -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 -- GitLab