Commit 3b5bd3f9 authored by Antoine Millet's avatar Antoine Millet

Fixed bug with AsyncWatcher and infinite timeout.

parent d4e2a4b6
......@@ -68,13 +68,13 @@ class AsyncWatcher(object):
>>> process(msg)
'''
responses = []
time_remains = timeout
while self._expected_responses:
try:
dt, response = self._get_in_queue(timeout=time_remains)
dt, response = self._get_in_queue(timeout=timeout)
except Empty:
break
time_remains -= dt
if timeout is not None:
timeout -= dt
responses.append(response)
self._expected_responses.remove(response['id'])
# Check for max_wait:
......
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