nodece commented on code in PR #17831:
URL: https://github.com/apache/pulsar/pull/17831#discussion_r980801591


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java:
##########
@@ -253,8 +254,25 @@ public void channelActive(ChannelHandlerContext ctx) 
throws Exception {
         } else {
             log.info("{} Connected through proxy to target broker at {}", 
ctx.channel(), proxyToTargetBrokerAddress);
         }
-        // Send CONNECT command
-        ctx.writeAndFlush(newConnectCommand())
+        completeActive();
+    }
+
+    protected void completeActive() throws Exception {
+        sendConnectCommand(null, null, null);
+    }
+
+    protected final void sendConnectCommand(String originalPrincipal, AuthData 
originalAuthData,
+                                            String originalAuthMethod) throws 
Exception {
+        // mutual authentication is to auth between `remoteHostName` and this 
client for this channel.
+        // each channel will have a mutual client/server pair, mutual client 
evaluateChallenge with init data,
+        // and return authData to server.
+        authenticationDataProvider = 
authentication.getAuthData(remoteHostName);

Review Comment:
   When using global variables, most do not have `this`.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to