Skip to content

Commit d5faba5

Browse files
committed
pop from in flight requests
1 parent b625326 commit d5faba5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kafka/conn.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,13 @@ def _recv_sasl_authenticate(self):
732732
return
733733

734734
if version == 1:
735-
((_correlation_id, response),) = self._protocol.receive_bytes(data)
735+
((correlation_id, response),) = self._protocol.receive_bytes(data)
736+
(future, timestamp, _timeout) = self.in_flight_requests.pop(correlation_id)
737+
latency_ms = (time.time() - timestamp) * 1000
738+
if self._sensors:
739+
self._sensors.request_time.record(latency_ms)
740+
log.debug('%s Response %d (%s ms): %s', self, correlation_id, latency_ms, response)
741+
736742
error_type = Errors.for_code(response.error_code)
737743
if error_type is not Errors.NoError:
738744
log.error("%s: SaslAuthenticate error: %s (%s)",

0 commit comments

Comments
 (0)