summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2018-11-20 08:20:17 -0800
committerDana Powers <dana.powers@gmail.com>2018-11-20 08:20:17 -0800
commit2c77c8d73c3bb81011b3440b1f0308fd48d0e627 (patch)
treed66f2b83c6635dfc59cb4108690c6db33ed45ac5
parent66754624e84da89d94f6bc8dd55bd969ad520ee4 (diff)
downloadkafka-python-2c77c8d73c3bb81011b3440b1f0308fd48d0e627.tar.gz
Break KafkaClient poll if closed
-rw-r--r--kafka/client_async.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py
index cf57ef9..b0d1f5e 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -551,6 +551,8 @@ class KafkaClient(object):
responses = []
while True:
with self._lock:
+ if self._closed:
+ break
# Attempt to complete pending connections
for node_id in list(self._connecting):