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):
613613 fetchable = self ._subscriptions .fetchable_partitions ()
614614 # do not fetch a partition if we have a pending fetch response to process
615615 # 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 )}
617618 current = self ._next_partition_records
618619 if current :
619620 discard .add (current .topic_partition )
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ def receive(self, auth_bytes):
6868 # simply set QoP to 'auth' only (first octet). We reuse the max message size proposed
6969 # by the server
7070 client_flags = self .SASL_QOP_AUTH
71- server_flags = msg [0 ]
71+ server_flags = struct . Struct ( '>b' ). unpack ( msg [ 0 : 1 ]) [0 ]
7272 message_parts = [
7373 struct .Struct ('>b' ).pack (client_flags & server_flags ),
74- msg [1 :],
74+ msg [1 :], # always agree to max message size from server
7575 self .auth_id .encode ('utf-8' ),
7676 ]
7777 # add authorization identity to the response, and GSS-wrap
You can’t perform that action at this time.
0 commit comments