diff options
author | Stephen D. Huston <shuston@apache.org> | 2011-10-21 01:19:00 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2011-10-21 01:19:00 +0000 |
commit | ebfd9ff053b04ab379acfc0fefedee5a31b6d8a5 (patch) | |
tree | dcfb94e75656c6c239fc3dcb754cd2015126424d /cpp/src/qpid/client/ConnectionImpl.cpp | |
parent | 5eb354b338bb8d8fcd35b6ac3fb33f8103e757c3 (diff) | |
download | qpid-python-ebfd9ff053b04ab379acfc0fefedee5a31b6d8a5.tar.gz |
Undo bad merge from trunk - merged at wrong level.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-2519@1187150 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index db97f1e0f4..40c004f166 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/ConnectionImpl.cpp @@ -36,7 +36,6 @@ #include <boost/bind.hpp> #include <boost/format.hpp> -#include <boost/lexical_cast.hpp> #include <boost/shared_ptr.hpp> #include <limits> @@ -259,16 +258,16 @@ void ConnectionImpl::open() connector->setInputHandler(&handler); connector->setShutdownHandler(this); try { - std::string p = boost::lexical_cast<std::string>(port); - connector->connect(host, p); - + connector->connect(host, port); + } catch (const std::exception& e) { QPID_LOG(debug, "Failed to connect to " << protocol << ":" << host << ":" << port << " " << e.what()); connector.reset(); - throw TransportFailure(e.what()); + throw; } connector->init(); - + QPID_LOG(info, *this << " connected to " << protocol << ":" << host << ":" << port); + // Enable heartbeat if requested uint16_t heartbeat = static_cast<ConnectionSettings&>(handler).heartbeat; if (heartbeat) { @@ -282,7 +281,6 @@ void ConnectionImpl::open() // - in that case in connector.reset() above; // - or when we are deleted handler.waitForOpen(); - QPID_LOG(info, *this << " connected to " << protocol << ":" << host << ":" << port); // If the SASL layer has provided an "operational" userId for the connection, // put it in the negotiated settings. |