diff options
author | Andrew Stitcher <astitcher@apache.org> | 2010-01-21 06:18:28 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2010-01-21 06:18:28 +0000 |
commit | d413df2f6869223e63b33318fe51ce41cb35adf9 (patch) | |
tree | 676436b146c7e07c1530f60554e73a2562de74d0 /cpp/src/qpid/client/ConnectionImpl.cpp | |
parent | f28b86eab784db7116171dccf652652238c86d8e (diff) | |
download | qpid-python-d413df2f6869223e63b33318fe51ce41cb35adf9.tar.gz |
Remove possible double closing of connection on connect failure
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@901552 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index f348493fd0..278c85acb9 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/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. |