summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src')
-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.