diff --git a/kafka/client_async.py b/kafka/client_async.py index 5308c1f9e..ecd2ceac7 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -245,12 +245,14 @@ def _bootstrap(self, hosts): **self.config) bootstrap.connect() while bootstrap.connecting(): + self._selector.select(1) bootstrap.connect() if not bootstrap.connected(): bootstrap.close() continue future = bootstrap.send(metadata_request) while not future.is_done: + self._selector.select(1) bootstrap.recv() if future.failed(): bootstrap.close()