From d413df2f6869223e63b33318fe51ce41cb35adf9 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 21 Jan 2010 06:18:28 +0000 Subject: 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 --- cpp/src/qpid/client/ConnectionImpl.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp') 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. -- cgit v1.2.1