diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2019-05-29 21:49:08 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2019-05-30 13:12:39 -0700 |
commit | 79dd508b14fd2d66a8b6d32353e8e64989c4ff84 (patch) | |
tree | b2ed93cdc5e05abaeb302b1f6dfa3ac87984e5c3 | |
parent | 9f0b518286ecfc6db8b7abbd2431810c16f1cc80 (diff) | |
download | kafka-python-79dd508b14fd2d66a8b6d32353e8e64989c4ff84.tar.gz |
Delay converting to seconds
Delaying the conversion to seconds makes the code intent more clear.
-rw-r--r-- | kafka/client_async.py | 4 |
1 files 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()) |