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 | 375bc332fb0fd497707d9ceb9901c87bc686538d (patch) | |
tree | 14ab06e2a76e7c08f4126b0285e88c69a45a0d82 | |
parent | ffd7d4bc92bf617531984169917d8b57adefdd4f (diff) | |
download | qpid-python-375bc332fb0fd497707d9ceb9901c87bc686538d.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@1292587 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/client/TCPConnector.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/client/TCPConnector.cpp b/qpid/cpp/src/qpid/client/TCPConnector.cpp index 51eacf77e8..4660a41c07 100644 --- a/qpid/cpp/src/qpid/client/TCPConnector.cpp +++ b/qpid/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; } |