activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: fix https://issues.apache.org/jira/browse/AMQCPP-520
Date Tue, 22 Oct 2013 16:29:03 GMT
Updated Branches:
  refs/heads/trunk e97905f90 -> c5a9f4521


fix https://issues.apache.org/jira/browse/AMQCPP-520

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

Branch: refs/heads/trunk
Commit: c5a9f4521693281878864e919d42a239c5961293
Parents: e97905f
Author: Timothy Bish <tabish121@gmai.com>
Authored: Tue Oct 22 12:27:23 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Tue Oct 22 12:27:23 2013 -0400

----------------------------------------------------------------------
 .../transport/failover/FailoverTransport.cpp    | 22 ++++++++------------
 1 file changed, 9 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/c5a9f452/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 954c211..91456af 100644
--- a/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
+++ b/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
@@ -690,25 +690,21 @@ void FailoverTransport::restoreTransport(const Pointer<Transport>
transport) {
 ////////////////////////////////////////////////////////////////////////////////
 void FailoverTransport::handleTransportFailure(const decaf::lang::Exception& error) {
 
-    Pointer<Transport> transport;
     synchronized(&this->impl->reconnectMutex) {
-        this->impl->connectedTransport.swap(transport);
-    }
-
-    if (transport != NULL) {
 
-        if (this->impl->disposedListener != NULL) {
-            transport->setTransportListener(this->impl->disposedListener.get());
-        }
+        Pointer<Transport> transport;
+        this->impl->connectedTransport.swap(transport);
 
-        // Hand off to the close task so it gets done in a different thread.
-        this->impl->closeTask->add(transport);
+        if (transport != NULL) {
 
-        bool reconnectOk = false;
+            if (this->impl->disposedListener != NULL) {
+                transport->setTransportListener(this->impl->disposedListener.get());
+            }
 
-        synchronized(&this->impl->reconnectMutex) {
+            // Hand off to the close task so it gets done in a different thread.
+            this->impl->closeTask->add(transport);
 
-            reconnectOk = this->impl->canReconnect();
+            bool reconnectOk = this->impl->canReconnect();
             URI failedUri = *this->impl->connectedTransportURI;
 
             this->impl->initialized = false;


Mime
View raw message