Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Delay converting to seconds #1825

Merged
merged 1 commit into from
May 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kafka/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,9 @@ def poll(self, timeout_ms=None, future=None):
# 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())

Expand Down