Skip to content

Commit 2c77c8d

Browse files
committed
Break KafkaClient poll if closed
1 parent 6675462 commit 2c77c8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kafka/client_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ def poll(self, timeout_ms=None, future=None):
551551
responses = []
552552
while True:
553553
with self._lock:
554+
if self._closed:
555+
break
554556

555557
# Attempt to complete pending connections
556558
for node_id in list(self._connecting):

0 commit comments

Comments
 (0)