diff options
author | Dana Powers <dana.powers@gmail.com> | 2019-06-29 11:59:03 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2019-06-29 11:59:03 -0700 |
commit | f6dca6d8d1a4faf01520225fd08507575263be4a (patch) | |
tree | e93745fb0a8e84afbead8734bc4bc65ebc57d13c | |
parent | 279a7dd85d5d15f8fffde95e0a2425cb8a2d4fe3 (diff) | |
download | kafka-python-f6dca6d8d1a4faf01520225fd08507575263be4a.tar.gz |
Fix conn lock release for gssapi/oauth
-rw-r--r-- | kafka/conn.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 825406c..37df802 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -624,6 +624,7 @@ class BrokerConnection(object): self._lock.acquire() if not self._can_send_recv(): + self._lock.release() return future.failure(Errors.NodeNotReadyError(str(self))) # Establish security context and negotiate protection level # For reference RFC 2222, section 7.2.1 @@ -687,6 +688,7 @@ class BrokerConnection(object): size = Int32.encode(len(msg)) self._lock.acquire() if not self._can_send_recv(): + self._lock.release() return future.failure(Errors.NodeNotReadyError(str(self))) try: # Send SASL OAuthBearer request with OAuth token |