diff options
| author | Alan Conway <aconway@apache.org> | 2012-02-22 23:46:48 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-02-22 23:46:48 +0000 |
| commit | d106621654c37a7692433ef9f64c4265513f72df (patch) | |
| tree | bf48d0c99368a846d955ebc75d5f90e40fcf2c9e /cpp | |
| parent | 524866dc4d469fca31028c9cadb5ae3b88bf06f2 (diff) | |
| download | qpid-python-d106621654c37a7692433ef9f64c4265513f72df.tar.gz | |
NO-JIRA: Fix error on windows "An operation was attempted on something that is not a socket."
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1292587 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/qpid/client/TCPConnector.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/TCPConnector.cpp b/cpp/src/qpid/client/TCPConnector.cpp index 51eacf77e8..4660a41c07 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,6 +120,8 @@ 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() { @@ -129,7 +131,7 @@ void TCPConnector::initAmqp() { void TCPConnector::connectFailed(const std::string& msg) { connector = 0; - QPID_LOG(warning, "Connect failed: " << msg << " " << identifier); + QPID_LOG(warning, "Connect failed: " << msg); socket.close(); if (!closed) closed = true; @@ -183,7 +185,7 @@ sys::ShutdownHandler* TCPConnector::getShutdownHandler() const { return shutdownHandler; } -const std::string& TCPConnector::getIdentifier() const { +const std::string& TCPConnector::getIdentifier() const { return identifier; } |
