You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/04 16:44:17 UTC

[GitHub] [pulsar] kkoderok commented on a diff in pull request #13339: [Issue 10816][Proxy] Refresh client auth token

kkoderok commented on code in PR #13339:
URL: https://github.com/apache/pulsar/pull/13339#discussion_r841945089


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java:
##########
@@ -240,16 +253,23 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception {
                         ctx.close();
                     }
                 });
+            } else {
+                log.warn("Error during handshake", th);
+                ctx.close();
+            }
+        });
     }
 
-    protected ByteBuf newConnectCommand() throws Exception {
+    protected CompletableFuture<ByteBuf> newConnectCommand() 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);
         AuthData authData = authenticationDataProvider.authenticate(AuthData.INIT_AUTH_DATA);
-        return Commands.newConnect(authentication.getAuthMethodName(), authData, this.protocolVersion,
-                PulsarVersion.getVersion(), proxyToTargetBrokerAddress, null, null, null);
+        return CompletableFuture.completedFuture(

Review Comment:
   I've done some changes, check them please.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org