rajinisivaram commented on code in PR #16418:
URL: https://github.com/apache/kafka/pull/16418#discussion_r1722864389


##########
clients/src/main/java/org/apache/kafka/common/network/Selector.java:
##########
@@ -350,6 +350,10 @@ private KafkaChannel 
buildAndAttachKafkaChannel(SocketChannel socketChannel, Str
             // Ideally, these resources are closed by the KafkaChannel but if 
the KafkaChannel is not created to an
             // error, this builder should close the resources it has created 
instead.
             Utils.closeQuietly(metadataRegistry, "metadataRegistry");
+            // If an Authentication Failure is encountered, throw that error 
directly.
+            if (e instanceof AuthenticationException) {
+                throw e;

Review Comment:
   Don't know of an existing test that verifies the case that the PR is trying 
to fix. So you may need to write your own test for the specific scenario. 



-- 
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

Reply via email to