Avoid unknown coordinator after client poll (#1023)

This commit is contained in:
Dana Powers 2017-03-09 12:49:05 -08:00 committed by GitHub
parent 218a9014b7
commit 6ef7675ba0
1 changed files with 6 additions and 7 deletions

View File

@ -245,13 +245,12 @@ class BaseCoordinator(object):
# ensure that there are no pending requests to the coordinator.
# This is important in particular to avoid resending a pending
# JoinGroup request.
if self._client.in_flight_request_count(self.coordinator_id):
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
while not self.coordinator_unknown():
if not self._client.in_flight_request_count(self.coordinator_id):
break
self._client.poll(delayed_tasks=False)
else:
continue
future = self._send_join_group_request()
self._client.poll(future=future)