From ad41533393d4e4a2704c44609327565a2f93caab Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Wed, 29 May 2019 21:49:08 -0700 Subject: Delay converting to seconds Delaying the conversion to seconds makes the code intent more clear. --- kafka/client_async.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kafka/client_async.py b/kafka/client_async.py index 42ec42b..96c0647 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -591,9 +591,9 @@ class KafkaClient(object): # if there are no requests in flight, do not block longer than the retry backoff if self.in_flight_request_count() == 0: timeout = min(timeout, self.config['retry_backoff_ms']) - timeout = max(0, timeout / 1000) # avoid negative timeouts + timeout = max(0, timeout) # avoid negative timeouts - self._poll(timeout) + self._poll(timeout / 1000) responses.extend(self._fire_pending_completed_requests()) -- cgit v1.2.1