diff options
author | Dana Powers <dana.powers@gmail.com> | 2019-03-13 18:33:38 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2019-03-13 18:51:10 -0700 |
commit | 4e93904d186d56f03a9912ed3ff847a9ff692369 (patch) | |
tree | df8951ef7e39b013519311d5ac3e4bf04ab1daa8 /kafka/client_async.py | |
parent | 7965460a7253a5f5c23e7343c0c06c40e40f471e (diff) | |
download | kafka-python-maybe_refreh_metadata_reconnect_delay.tar.gz |
Recheck connecting nodes sooner when refreshing metadatamaybe_refreh_metadata_reconnect_delay
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) |