From 2c77c8d73c3bb81011b3440b1f0308fd48d0e627 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Tue, 20 Nov 2018 08:20:17 -0800 Subject: Break KafkaClient poll if closed --- kafka/client_async.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kafka/client_async.py') 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): -- cgit v1.2.1