Commit b75d3586 authored by Antoine Millet's avatar Antoine Millet
Browse files

Releases all running calls when connection is shutdown.

parent 7ed7ceb5
......@@ -331,6 +331,14 @@ class RpcConnection(object):
self._sock.close()
# Release all running calls from this connection:
for call in self._calls.values():
if 'event' in call:
call['error'] = {'exception': 'RpcError',
'message': 'Connection reset by peer'}
call['return'] = None
call['event'].set()
if callback is not None and not callable(callback):
if self._handler is not None:
try:
......
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