diff options
author | Dana Powers <dana.powers@gmail.com> | 2018-11-20 08:20:17 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2018-11-20 08:20:17 -0800 |
commit | 2c77c8d73c3bb81011b3440b1f0308fd48d0e627 (patch) | |
tree | d66f2b83c6635dfc59cb4108690c6db33ed45ac5 | |
parent | 66754624e84da89d94f6bc8dd55bd969ad520ee4 (diff) | |
download | kafka-python-2c77c8d73c3bb81011b3440b1f0308fd48d0e627.tar.gz |
Break KafkaClient poll if closed
-rw-r--r-- | kafka/client_async.py | 2 |
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): |