summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionImpl.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-10-30 20:33:46 +0000
committerAlan Conway <aconway@apache.org>2009-10-30 20:33:46 +0000
commit6fa6fd99a004c98533f533dc52933c3cbc3c2674 (patch)
treebeda4c61f66c527f0635060df1f68a30b5334893 /cpp/src/qpid/client/ConnectionImpl.cpp
parent4554dcd498ee2e446795edb5315ec3c9bf142615 (diff)
downloadqpid-python-6fa6fd99a004c98533f533dc52933c3cbc3c2674.tar.gz
Fix memory leak in testCoincidentErrors due to un-joined connector thread.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@831446 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionImpl.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp
index e4e7b2f5c2..4f35639c71 100644
--- a/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -156,8 +156,14 @@ void ConnectionImpl::open()
handler.setRcvTimeoutTask(heartbeatTask);
theTimer().add(heartbeatTask);
}
-
- handler.waitForOpen();
+
+ try {
+ handler.waitForOpen();
+ } catch (...) {
+ // Make sure the connector thread is joined.
+ connector->close();
+ throw;
+ }
// If the SASL layer has provided an "operational" userId for the connection,
// put it in the negotiated settings.