diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-06-18 16:43:57 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-06-18 23:21:22 -0700 |
commit | 915466a9fcc84c453f03d4e0425f0bc81a696656 (patch) | |
tree | 3ef2a9871f3fc562e77eb257a5fa2fd64ada3b34 | |
parent | 8818987162696802ef0a7d91237a6d4bb583d437 (diff) | |
download | kafka-python-915466a9fcc84c453f03d4e0425f0bc81a696656.tar.gz |
Always process pending MetadataRequest in conn.check_version
-rw-r--r-- | kafka/conn.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 24a2b98..005dd7e 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -598,11 +598,11 @@ class BrokerConnection(object): # the attempt to write to a disconnected socket should # immediately fail and allow us to infer that the prior # request was unrecognized - self.send(MetadataRequest[0]([])) + mr = self.send(MetadataRequest[0]([])) if self._sock: self._sock.setblocking(True) - while not f.is_done: + while not (f.is_done and mr.is_done): self.recv() if self._sock: self._sock.setblocking(False) |