summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/TCPIOPlugin.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-01-21 06:15:06 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-01-21 06:15:06 +0000
commit4dae7bc7c71ead4a97c192f839abb1b3c64a55a9 (patch)
tree7759ff53bfbed958d832c9883fbcf45ce344130c /cpp/src/qpid/sys/TCPIOPlugin.cpp
parent56c8e15171dae96958cd9106e2e05abbf02739fc (diff)
downloadqpid-python-4dae7bc7c71ead4a97c192f839abb1b3c64a55a9.tar.gz
Split out AsynchConnecter::start from constructor (like other AsynchIO classes)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@901547 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/TCPIOPlugin.cpp')
-rw-r--r--cpp/src/qpid/sys/TCPIOPlugin.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/cpp/src/qpid/sys/TCPIOPlugin.cpp b/cpp/src/qpid/sys/TCPIOPlugin.cpp
index 39ae12c189..d0c7fe4caa 100644
--- a/cpp/src/qpid/sys/TCPIOPlugin.cpp
+++ b/cpp/src/qpid/sys/TCPIOPlugin.cpp
@@ -141,14 +141,15 @@ void AsynchIOProtocolFactory::connect(
// is no longer needed.
Socket* socket = new Socket();
- AsynchConnector::create(*socket,
- poller,
- host,
- port,
- boost::bind(&AsynchIOProtocolFactory::established,
- this, poller, _1, fact, true),
- boost::bind(&AsynchIOProtocolFactory::connectFailed,
- this, _1, _2, _3, failed));
+ AsynchConnector* c = AsynchConnector::create(
+ *socket,
+ host,
+ port,
+ boost::bind(&AsynchIOProtocolFactory::established,
+ this, poller, _1, fact, true),
+ boost::bind(&AsynchIOProtocolFactory::connectFailed,
+ this, _1, _2, _3, failed));
+ c->start(poller);
}
}} // namespace qpid::sys