File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -613,7 +613,8 @@ def _fetchable_partitions(self):
613
613
fetchable = self ._subscriptions .fetchable_partitions ()
614
614
# do not fetch a partition if we have a pending fetch response to process
615
615
# use copy.copy to avoid runtimeerror on mutation from different thread
616
- discard = {fetch .topic_partition for fetch in self ._completed_fetches .copy ()}
616
+ # TODO: switch to deque.copy() with py3
617
+ discard = {fetch .topic_partition for fetch in copy .copy (self ._completed_fetches )}
617
618
current = self ._next_partition_records
618
619
if current :
619
620
discard .add (current .topic_partition )
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ def receive(self, auth_bytes):
68
68
# simply set QoP to 'auth' only (first octet). We reuse the max message size proposed
69
69
# by the server
70
70
client_flags = self .SASL_QOP_AUTH
71
- server_flags = msg [0 ]
71
+ server_flags = struct . Struct ( '>b' ). unpack ( msg [ 0 : 1 ]) [0 ]
72
72
message_parts = [
73
73
struct .Struct ('>b' ).pack (client_flags & server_flags ),
74
- msg [1 :],
74
+ msg [1 :], # always agree to max message size from server
75
75
self .auth_id .encode ('utf-8' ),
76
76
]
77
77
# add authorization identity to the response, and GSS-wrap
You can’t perform that action at this time.
0 commit comments