summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/TCPConnector.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-02-22 23:46:48 +0000
committerAlan Conway <aconway@apache.org>2012-02-22 23:46:48 +0000
commite00200920841c9279c16f7fb02b8a5b95d19ef48 (patch)
treebf48d0c99368a846d955ebc75d5f90e40fcf2c9e /cpp/src/qpid/client/TCPConnector.cpp
parent6c8a51edd3fbd9751df0e173cd779f3e8e07d723 (diff)
downloadqpid-python-e00200920841c9279c16f7fb02b8a5b95d19ef48.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/src/qpid/client/TCPConnector.cpp')
-rw-r--r--cpp/src/qpid/client/TCPConnector.cpp8
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;
}