You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/06/26 06:39:13 UTC
[GitHub] [pulsar] tisonkun commented on a diff in pull request #20595: [fix][client] Make the whole grabCnx() progress atomic
tisonkun commented on code in PR #20595:
URL: https://github.com/apache/pulsar/pull/20595#discussion_r1241643756
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java:
##########
@@ -63,11 +64,20 @@ protected void grabCnx() {
return;
}
- if (!isValidStateForReconnection()) {
- // Ignore connection closed when we are shutting down
- log.info("[{}] [{}] Ignoring reconnection request (state: {})",
- state.topic, state.getHandlerName(), state.getState());
- return;
+ synchronized (this) {
+ if (connectFuture != null && !connectFuture.isDone()) {
+ log.warn("[{}] [{}] Skip grabbing the connection since there is a pending connection",
Review Comment:
I guess this is a normal case that we don't need warning?
--
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