BewareMyPower commented on code in PR #20595:
URL: https://github.com/apache/pulsar/pull/20595#discussion_r1246805577
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java:
##########
@@ -100,7 +102,7 @@ protected void grabCnx() {
log.error("[{}] [{}] Unexpected exception after
the connection",
state.topic, state.getHandlerName(), e);
}
- duringConnect = false;
+ duringConnect.compareAndSet(true, false);
Review Comment:
It's hard to simulate this race condition. I only added tests to verify
`duringConnect.set(false)` and `duringConnect.compareAndSet(false, true)` are
both called once each time.
--
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]