summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2017-10-24 11:18:03 -0700
committerDana Powers <dana.powers@gmail.com>2017-10-24 11:18:03 -0700
commit0d48bd10fa2236ada4daaa0dd781c623a0433786 (patch)
tree27641bbe1090b05f13303cc81062cf46d8d1defd
parente06af5343a55cf8d03e32a645ee970d872cb9ba0 (diff)
downloadkafka-python-0d48bd10fa2236ada4daaa0dd781c623a0433786.tar.gz
Fix more gssapi errorsmore_sasl_fixes
-rw-r--r--kafka/conn.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py
index da08eac..c1c4fbb 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -561,6 +561,9 @@ class BrokerConnection(object):
# calculate an output token from kafka token (or None if first iteration)
output_token = client_ctx.step(received_token)
+ if output_token is None:
+ continue
+
# pass output token to kafka
try:
msg = output_token
@@ -572,7 +575,7 @@ class BrokerConnection(object):
# The gssapi will be able to identify the needed next step.
# The connection is closed on failure.
header = self._recv_bytes_blocking(4)
- token_size = struct.unpack('>i', header)
+ (token_size,) = struct.unpack('>i', header)
received_token = self._recv_bytes_blocking(token_size)
except ConnectionError as e: