activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JiriOndrusek <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1761: [ARTEMIS-1527] - [Artemis Testsuite] Ac...
Date Tue, 09 Jan 2018 14:34:24 GMT
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, ...)


---

Mime
View raw message