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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to