You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "clebertsuconic (via GitHub)" <gi...@apache.org> on 2023/05/18 14:09:12 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a diff in pull request #4482: ARTEMIS-4283 Fail fast CORE client connect on closing

clebertsuconic commented on code in PR #4482:
URL: https://github.com/apache/activemq-artemis/pull/4482#discussion_r1197877004


##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java:
##########
@@ -519,7 +522,8 @@ public void cleanup() {
    @Override
    public boolean waitForTopology(long timeout, TimeUnit unit) {
       try {
-         return latchFinalTopology.await(timeout, unit);
+         //latchFinalTopology is decremented on close
+         return latchFinalTopology.await(timeout, unit) && !closed;

Review Comment:
   wouldn't be more readable to read the !closed on the caller?



-- 
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: gitbox-unsubscribe@activemq.apache.org

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