activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq-cpp git commit: https://issues.apache.org/jira/browse/AMQCPP-569 https://issues.apache.org/jira/browse/AMQCPP-568
Date Wed, 15 Jul 2015 17:49:10 GMT
Repository: activemq-cpp
Updated Branches:
  refs/heads/master 8b607b49b -> d73ae266b


https://issues.apache.org/jira/browse/AMQCPP-569
https://issues.apache.org/jira/browse/AMQCPP-568

More agressive cleanup of failed connect Transport instances to avoid an
ever increasing number of them being held until successful reconnect.

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

Branch: refs/heads/master
Commit: d73ae266b0d98328d8f65a4b844f0f5f0d64d19d
Parents: 8b607b4
Author: Timothy Bish <tabish121@gmail.com>
Authored: Wed Jul 15 13:25:23 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Wed Jul 15 13:25:23 2015 -0400

----------------------------------------------------------------------
 .../transport/failover/CloseTransportsTask.cpp  |  4 +---
 .../transport/failover/FailoverTransport.cpp    | 24 ++++++++++----------
 2 files changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/d73ae266/activemq-cpp/src/main/activemq/transport/failover/CloseTransportsTask.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/transport/failover/CloseTransportsTask.cpp b/activemq-cpp/src/main/activemq/transport/failover/CloseTransportsTask.cpp
index 6ff900d..4465ddc 100644
--- a/activemq-cpp/src/main/activemq/transport/failover/CloseTransportsTask.cpp
+++ b/activemq-cpp/src/main/activemq/transport/failover/CloseTransportsTask.cpp
@@ -54,7 +54,7 @@ bool CloseTransportsTask::isPending() const {
 ////////////////////////////////////////////////////////////////////////////////
 bool CloseTransportsTask::iterate() {
 
-    if (!transports.isEmpty()) {
+    while (!transports.isEmpty()) {
         Pointer<Transport> transport = transports.take();
 
         try {
@@ -63,8 +63,6 @@ bool CloseTransportsTask::iterate() {
         AMQ_CATCHALL_NOTHROW()
 
         transport.reset(NULL);
-
-        return !transports.isEmpty();
     }
 
     return false;

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/d73ae266/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp b/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
index 1c35e9e..3e1059a 100644
--- a/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
+++ b/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
@@ -632,9 +632,9 @@ void FailoverTransport::close() {
             transportToStop->close();
         }
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -682,9 +682,9 @@ void FailoverTransport::restoreTransport(const Pointer<Transport>
transport) {
             transport->oneway(iter->next());
         }
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -757,8 +757,8 @@ void FailoverTransport::handleConnectionControl(const Pointer<Command>
control)
 
         processNewTransports(ctrlCommand->isRebalanceConnection(), ctrlCommand->getConnectedBrokers());
     }
-    AMQ_CATCH_RETHROW( Exception)
-    AMQ_CATCHALL_THROW( Exception)
+    AMQ_CATCH_RETHROW(Exception)
+    AMQ_CATCHALL_THROW(Exception)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1039,9 +1039,9 @@ Pointer<Transport> FailoverTransport::createTransport(const URI&
location) const
 
         return transport;
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1104,7 +1104,7 @@ void FailoverTransport::processResponse(const Pointer<Response>
response) {
             Pointer<Tracked> tracked = object.dynamicCast<Tracked>();
             tracked->onResponse();
         }
-        AMQ_CATCH_NOTHROW( ClassCastException)
+        AMQ_CATCH_NOTHROW(ClassCastException)
     }
 }
 


Mime
View raw message