dajac commented on a change in pull request #11586: URL: https://github.com/apache/kafka/pull/11586#discussion_r800075216
########## File path: clients/src/main/java/org/apache/kafka/common/network/Selector.java ########## @@ -945,6 +947,8 @@ private void close(KafkaChannel channel, CloseMode closeMode) { if (idleExpiryManager != null) idleExpiryManager.remove(channel.id()); + + sensors.maybeUnregisterConnectionMetrics(channel.id()); Review comment: It seems that you are right, David. Closing when the selector is closed makes more sense. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org