poorbarcode commented on code in PR #23853:
URL: https://github.com/apache/pulsar/pull/23853#discussion_r1919490527


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java:
##########
@@ -192,13 +193,12 @@ public void connectionClosed(ClientCnx cnx, 
Optional<Long> initialConnectionDela
         duringConnect.set(false);
         state.client.getCnxPool().releaseConnection(cnx);
         if (CLIENT_CNX_UPDATER.compareAndSet(this, cnx, null)) {
-            if (!isValidStateForReconnection()) {
+            if (!state.changeToConnecting()) {

Review Comment:
   It still allows
   
   > ```java
   > return (STATE_UPDATER.compareAndSet(this, State.Uninitialized, 
State.Connecting)
   >                || STATE_UPDATER.compareAndSet(this, State.Ready, 
State.Connecting)
   >                || STATE_UPDATER.compareAndSet(this, 
State.RegisteringSchema, State.Connecting));
   > ```



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to