Commit 52a7d9c1 authored by Antoine Millet's avatar Antoine Millet

Fixed bug with timeouted calls.

parent b2ccb368
......@@ -92,6 +92,19 @@ class ConnectionManager(object):
if not already_completed:
waiter['event'].wait(timeout=timeout)
# Clean the call list on each attached RpcConnection
for connection in self.all_connections():
connection.clean_all_calls(msg_id_set)
# Get the messages:
messages = []
for msg_id, msg in self._received_msg.items():
if msg_id in msg_id_set:
messages.append(msg)
del self._received_msg[msg_id]
waiter['responses'] = tuple(messages)
messages = waiter['responses']
del self._wait_groups[msg_id_set]
......@@ -130,19 +143,6 @@ class ConnectionManager(object):
or not waiter['wait_all'] and not recv_msg.isdisjoint(waitset))
if is_ok:
# Clean the call list on each attached RpcConnection
for connection in self.all_connections():
connection.clean_all_calls(waitset)
# Get the messages:
messages = []
for msg_id, msg in self._received_msg.items():
if msg_id in waitset:
messages.append(msg)
del self._received_msg[msg_id]
waiter['responses'] = tuple(messages)
# Unlock the event:
waiter['event'].set()
......
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