diff options
author | Dana Powers <dana.powers@gmail.com> | 2019-03-13 21:38:28 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2019-03-13 21:38:28 -0700 |
commit | 302b30c7c9f911ce8ec948926021d3fdf16cbedc (patch) | |
tree | 1cc117f7ff2bf294e3d4d3cccd4aa7a7f6fad0a8 /kafka/client_async.py | |
parent | 1cd505df43ab9d8c08405338e71b913d22275198 (diff) | |
download | kafka-python-302b30c7c9f911ce8ec948926021d3fdf16cbedc.tar.gz |
Recheck connecting nodes sooner when refreshing metadata (#1737)
Diffstat (limited to 'kafka/client_async.py')
-rw-r--r-- | kafka/client_async.py | 4 |
1 files changed, 1 insertions, 3 deletions
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) |