From 302b30c7c9f911ce8ec948926021d3fdf16cbedc Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Wed, 13 Mar 2019 21:38:28 -0700 Subject: Recheck connecting nodes sooner when refreshing metadata (#1737) --- kafka/client_async.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'kafka/client_async.py') diff --git a/kafka/client_async.py b/kafka/client_async.py index d608e6a..b2ea286 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -825,9 +825,7 @@ class KafkaClient(object): # the client from unnecessarily connecting to additional nodes while a previous connection # attempt has not been completed. if self._connecting: - # Strictly the timeout we should return here is "connect timeout", but as we don't - # have such application level configuration, using request timeout instead. - return self.config['request_timeout_ms'] + return self.config['reconnect_backoff_ms'] if self.maybe_connect(node_id): log.debug("Initializing connection to node %s for metadata request", node_id) -- cgit v1.2.1