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

Fixed bug with AsyncWatcher and infinite timeout.

parent d4e2a4b6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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: