We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e06af53 commit 4213d53Copy full SHA for 4213d53
kafka/conn.py
@@ -561,6 +561,9 @@ def _try_authenticate_gssapi(self, future):
561
# calculate an output token from kafka token (or None if first iteration)
562
output_token = client_ctx.step(received_token)
563
564
+ if output_token is None:
565
+ continue
566
+
567
# pass output token to kafka
568
try:
569
msg = output_token
@@ -572,7 +575,7 @@ def _try_authenticate_gssapi(self, future):
572
575
# The gssapi will be able to identify the needed next step.
573
576
# The connection is closed on failure.
574
577
header = self._recv_bytes_blocking(4)
- token_size = struct.unpack('>i', header)
578
+ (token_size,) = struct.unpack('>i', header)
579
received_token = self._recv_bytes_blocking(token_size)
580
581
except ConnectionError as e:
0 commit comments