diff options
author | Dana Powers <dana.powers@gmail.com> | 2017-10-21 15:46:33 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2017-10-21 15:46:33 -0700 |
commit | fe243c2d8db9a00a55a273c4f656f15fa1c5a81f (patch) | |
tree | 5163ef43d1a5d637d4b0573148b11052eef4ba1f | |
parent | faf1749f3866a52b6d659a39dd04d0b635dd6a3d (diff) | |
download | kafka-python-fe243c2d8db9a00a55a273c4f656f15fa1c5a81f.tar.gz |
Fixup for PR 1258 / _try_authenticate
-rw-r--r-- | kafka/conn.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 4c21b8c..da08eac 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -455,7 +455,10 @@ class BrokerConnection(object): sasl_response.add_callback(self._handle_sasl_handshake_response, future) sasl_response.add_errback(lambda f, e: f.failure(e), future) self._sasl_auth_future = future - self.recv() + + for r, f in self.recv(): + f.success(r) + # A connection error could trigger close() which will reset the future if self._sasl_auth_future is None: return False |