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


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -761,6 +761,11 @@ public void negativeAcknowledge(Message<?> message) {
 
     @Override
     public CompletableFuture<Void> connectionOpened(final ClientCnx cnx) {
+        // If success skip this subscribe request. If reconnection is 
required, whoever changes the state is
+        // responsible for reconnection. And the variable "duringConnect" will 
prevent the concurrent execution.
+        if (getState() == State.Ready) {
+            return CompletableFuture.completedFuture(null);
+        }

Review Comment:
   Fixed, thanks



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