summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-01-21 06:18:28 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-01-21 06:18:28 +0000
commit12a1a860eceab428345b39ee18045ede2dd8a39d (patch)
tree074ace841c03a3676507da4d6d413baa7c12c966
parenta7fffaaf5ca8e373b50ab857d924d655cbe3453e (diff)
downloadqpid-python-12a1a860eceab428345b39ee18045ede2dd8a39d.tar.gz
Remove possible double closing of connection on connect failure
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@901552 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/client/ConnectionImpl.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
index f348493fd0..278c85acb9 100644
--- a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -245,13 +245,10 @@ void ConnectionImpl::open()
theTimer().add(heartbeatTask);
}
- try {
- handler.waitForOpen();
- } catch (...) {
- // Make sure the connector thread is joined.
- connector->close();
- throw;
- }
+ // If the connect fails then the connector is cleaned up either when we try to connect again
+ // - in that case in connector.reset() above;
+ // - or when we are deleted
+ handler.waitForOpen();
// If the SASL layer has provided an "operational" userId for the connection,
// put it in the negotiated settings.