summaryrefslogtreecommitdiff
path: root/kafka/coordinator/base.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2016-12-02 18:25:28 -0800
committerGitHub <noreply@github.com>2016-12-02 18:25:28 -0800
commit010ebb53a9e3b1c4e8d69a623e4a082b5a2b9baa (patch)
tree8d1d172b983c7cb4bdc70418d4e971d99b2b30d6 /kafka/coordinator/base.py
parent9b59c5d755af73c2e7863e98b84b5882c297afda (diff)
downloadkafka-python-010ebb53a9e3b1c4e8d69a623e4a082b5a2b9baa.tar.gz
Fix possible request draining in ensure_active_group (#896)
Diffstat (limited to 'kafka/coordinator/base.py')
-rw-r--r--kafka/coordinator/base.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py
index 22dffb4..e4ebcb0 100644
--- a/kafka/coordinator/base.py
+++ b/kafka/coordinator/base.py
@@ -246,9 +246,12 @@ class BaseCoordinator(object):
# This is important in particular to avoid resending a pending
# JoinGroup request.
if self._client.in_flight_request_count(self.coordinator_id):
- while self._client.in_flight_request_count(self.coordinator_id):
- self._client.poll()
- continue
+ while not self.coordinator_unknown():
+ self._client.poll(delayed_tasks=False)
+ if not self._client.in_flight_request_count(self.coordinator_id):
+ break
+ else:
+ continue
future = self._send_join_group_request()
self._client.poll(future=future)