From 4213d53d4ccfd239addc1db07b5b3913b4c6547c Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Tue, 24 Oct 2017 15:16:13 -0700 Subject: Fix more gssapi errors (#1280) --- kafka/conn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kafka/conn.py') 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: -- cgit v1.2.1