summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/client_async.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py
index 0f4863a..f048be9 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -440,6 +440,13 @@ class KafkaClient(object):
"""
nodes = list(self._conns.keys())
random.shuffle(nodes)
+
+ # If there's a lingering bootstrap node, always try it last
+ # really we should just kill this connection
+ if 'bootstrap' in nodes:
+ nodes.remove('bootstrap')
+ nodes.append('bootstrap')
+
inflight = float('inf')
found = None
for node_id in nodes: