Skip to content

Fix more gssapi errors #1280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kafka/conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ def _try_authenticate_gssapi(self, future):
# 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
Expand All @@ -572,7 +575,7 @@ def _try_authenticate_gssapi(self, future):
# 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:
Expand Down