Skip to content

Commit 79dd508

Browse files
committed
Delay converting to seconds
Delaying the conversion to seconds makes the code intent more clear.
1 parent 9f0b518 commit 79dd508

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kafka/client_async.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ def poll(self, timeout_ms=None, future=None):
591591
# if there are no requests in flight, do not block longer than the retry backoff
592592
if self.in_flight_request_count() == 0:
593593
timeout = min(timeout, self.config['retry_backoff_ms'])
594-
timeout = max(0, timeout / 1000) # avoid negative timeouts
594+
timeout = max(0, timeout) # avoid negative timeouts
595595

596-
self._poll(timeout)
596+
self._poll(timeout / 1000)
597597

598598
responses.extend(self._fire_pending_completed_requests())
599599

0 commit comments

Comments
 (0)