diff options
| author | Alan Conway <aconway@apache.org> | 2012-02-17 14:54:46 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-02-17 14:54:46 +0000 |
| commit | d2200f6eadcbb389bc684ec82ba4a67834cbe5a4 (patch) | |
| tree | 288469c17dacc37199b5f77498965fee7e778d95 /cpp/src/qpid/client/TCPConnector.cpp | |
| parent | 55b4fa8f909a1ca14442d0119457ad4a672213fd (diff) | |
| download | qpid-python-d2200f6eadcbb389bc684ec82ba4a67834cbe5a4.tar.gz | |
QPID-3603: Merge new HA foundations.
Merged from qpid-3603-7. This is basic support for the new HA approach.
For information & limitations see qpid/cpp/design_docs/new-ha-design.txt.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1245587 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/TCPConnector.cpp')
| -rw-r--r-- | cpp/src/qpid/client/TCPConnector.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/src/qpid/client/TCPConnector.cpp b/cpp/src/qpid/client/TCPConnector.cpp index 4660a41c07..51eacf77e8 100644 --- a/cpp/src/qpid/client/TCPConnector.cpp +++ b/cpp/src/qpid/client/TCPConnector.cpp @@ -97,7 +97,7 @@ void TCPConnector::connect(const std::string& host, const std::string& port) { boost::bind(&TCPConnector::connected, this, _1), boost::bind(&TCPConnector::connectFailed, this, _3)); closed = false; - + identifier = str(format("[%1%]") % socket.getFullAddress()); connector->start(poller); } @@ -120,8 +120,6 @@ void TCPConnector::start(sys::AsynchIO* aio_) { for (int i = 0; i < 4; i++) { aio->queueReadBuffer(new Buff(maxFrameSize)); } - - identifier = str(format("[%1%]") % socket.getFullAddress()); } void TCPConnector::initAmqp() { @@ -131,7 +129,7 @@ void TCPConnector::initAmqp() { void TCPConnector::connectFailed(const std::string& msg) { connector = 0; - QPID_LOG(warning, "Connect failed: " << msg); + QPID_LOG(warning, "Connect failed: " << msg << " " << identifier); socket.close(); if (!closed) closed = true; @@ -185,7 +183,7 @@ sys::ShutdownHandler* TCPConnector::getShutdownHandler() const { return shutdownHandler; } -const std::string& TCPConnector::getIdentifier() const { +const std::string& TCPConnector::getIdentifier() const { return identifier; } |
