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

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

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


##########
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:
   The `latchFinalTopology` is decremented in the `ClientSessionFactoryImpl.close` while the `ClientSessionFactoryImpl.waitForTopology` method is called in `ServerLocatorImpl.waitForTopology`. Do you mean to move the `!closed` in the ServerLocatorImpl.waitForTopology`?



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