Github user JiriOndrusek commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1761#discussion_r160421530
  
    --- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
 ---
    @@ -990,17 +1111,26 @@ public CloseRunnable(RemotingConnection conn, String 
scaleDownTargetNodeID) {
           // can cause reconnect loop
           @Override
           public void run() {
    -         try {
    -            CLOSE_RUNNABLES.add(this);
    -            if (scaleDownTargetNodeID == null) {
    -               
conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected());
    -            } else {
    -               
conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected(), 
scaleDownTargetNodeID);
    -            }
    -         } finally {
    -            CLOSE_RUNNABLES.remove(this);
    +         CLOSE_RUNNABLES.add(this);
    +         CountDownLatch latch;
    +         if (scaleDownTargetNodeID == null) {
    +            latch = 
conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected());
    +         } else {
    +            latch = 
conn.fail(ActiveMQClientMessageBundle.BUNDLE.disconnected(), 
scaleDownTargetNodeID);
              }
     
    +         //TODO(jondruse) is there constant or property usable for this 
kind of wait interval?
    --- End diff --
    
    I have too use "constant" for repetitive checking, whether action is 
already finished. May I use some generic timeout used in project (or define new 
attribute, ...)


---

Reply via email to