Skip to content

Commit e5025c8

Browse files
committed
200ms timeout for client.poll in ensure_active_group and admin client
1 parent 1ac8644 commit e5025c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kafka/admin/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def _send_request_to_node(self, node_id, request, wakeup=True):
390390
while not self._client.ready(node_id):
391391
# poll until the connection to broker is ready, otherwise send()
392392
# will fail with NodeNotReadyError
393-
self._client.poll()
393+
self._client.poll(timeout_ms=200)
394394
return self._client.send(node_id, request, wakeup)
395395

396396
def _send_request_to_controller(self, request):

kafka/coordinator/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def ensure_active_group(self):
371371
while not self.coordinator_unknown():
372372
if not self._client.in_flight_request_count(self.coordinator_id):
373373
break
374-
self._client.poll()
374+
self._client.poll(timeout_ms=200)
375375
else:
376376
continue
377377

0 commit comments

Comments
 (0)