You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/10/22 18:29:03 UTC
git commit: fix https://issues.apache.org/jira/browse/AMQCPP-520
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 <ta...@gmai.com>
Authored: Tue Oct 22 12:27:23 2013 -0400
Committer: Timothy Bish <ta...@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;