summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBraedon Vickers <braedon.vickers@gmail.com>2018-02-22 07:00:19 +1300
committerDana Powers <dana.powers@gmail.com>2018-02-21 10:00:19 -0800
commit92635d9bfff5593ba865003dd3010a0feb280140 (patch)
treeeb7f172ae91b6910c71428b8618c345ee492379c
parentf5a0e402dbd05eeaf96649e39d35524dd993d9ef (diff)
downloadkafka-python-92635d9bfff5593ba865003dd3010a0feb280140.tar.gz
Correctly respect timeouts in consumer poll interface (#1384)
-rw-r--r--kafka/consumer/group.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index 1c1f1e8..debbd2d 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -642,7 +642,7 @@ class KafkaConsumer(six.Iterator):
# Send any new fetches (won't resend pending fetches)
self._fetcher.send_fetches()
- timeout_ms = min(timeout_ms, self._coordinator.time_to_next_poll())
+ timeout_ms = min(timeout_ms, self._coordinator.time_to_next_poll() * 1000)
self._client.poll(timeout_ms=timeout_ms)
# after the long poll, we should check whether the group needs to rebalance
# prior to returning data so that the group can stabilize faster