activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-6 git commit: fix tests I broke; refactor a few other pieces
Date Thu, 29 Jan 2015 16:53:12 GMT
Repository: activemq-6
Updated Branches:
  refs/heads/master 8bdad8897 -> 7cdd77c78


fix tests I broke; refactor a few other pieces

I broke serveral tests with 8f4142f87ec2456fd61379dfaa7cafcc30acdcf4
so I'm restoring that, and I'm refactoring a few other pieces so the
code is simpler and/or more correct.


Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/e17e3ba4
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/e17e3ba4
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/e17e3ba4

Branch: refs/heads/master
Commit: e17e3ba4f60b31cfa489c312a40e3c7fc24b437f
Parents: 8bdad88
Author: jbertram <jbertram@redhat.com>
Authored: Wed Jan 28 16:08:45 2015 -0600
Committer: jbertram <jbertram@redhat.com>
Committed: Thu Jan 29 10:36:10 2015 -0600

----------------------------------------------------------------------
 .../core/remoting/server/impl/RemotingServiceImpl.java      | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e17e3ba4/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
----------------------------------------------------------------------
diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
index 811208c..9cb009a 100644
--- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/server/impl/RemotingServiceImpl.java
@@ -400,8 +400,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
          if (!conn.isClient())
          {
             conn.disconnect(scaleDownNodeID, false);
-            connections.remove(entry.getKey());
-            connectionCountLatch.countDown();
+            removeConnection(entry.getKey());
          }
       }
    }
@@ -508,10 +507,10 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
    public RemotingConnection removeConnection(final Object remotingConnectionID)
    {
       ConnectionEntry entry = connections.remove(remotingConnectionID);
-      connectionCountLatch.countDown();
 
       if (entry != null)
       {
+         connectionCountLatch.countDown();
          return entry.connection;
       }
       else
@@ -604,8 +603,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
          // so we need to keep them for ttl, in case re-attachment occurs
          if (empty)
          {
-            connections.remove(connectionID);
-            connectionCountLatch.countDown();
+            removeConnection(connectionID);
 
             conn.connection.destroy();
          }
@@ -789,6 +787,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
                   if (conn != null)
                   {
                      conn.fail(ActiveMQMessageBundle.BUNDLE.clientExited(conn.getRemoteAddress()));
+                     removeConnection(id);
                   }
                }
 


Mime
View raw message