Skip to content

Commit

Permalink
Break KafkaClient poll if closed
Browse files Browse the repository at this point in the history
  • Loading branch information
dpkp committed Nov 20, 2018
1 parent 6675462 commit 2c77c8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kafka/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ def poll(self, timeout_ms=None, future=None):
responses = []
while True:
with self._lock:
if self._closed:
break

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

0 comments on commit 2c77c8d

Please sign in to comment.