diff options
author | Andrew Stitcher <astitcher@apache.org> | 2010-01-21 06:17:58 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2010-01-21 06:17:58 +0000 |
commit | f28b86eab784db7116171dccf652652238c86d8e (patch) | |
tree | 901ce20f8c50b6d851e47d10e30c3cb82fa527bc /cpp/src | |
parent | df3fe9778d87dd256a2d4c08146d86830ac1e8be (diff) | |
download | qpid-python-f28b86eab784db7116171dccf652652238c86d8e.tar.gz |
Fix a potential RDMA connect failure race
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@901551 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/RdmaConnector.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index e51ee95c61..d67a0fcb2e 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/cpp/src/qpid/client/RdmaConnector.cpp @@ -172,9 +172,9 @@ void RdmaConnector::connect(const std::string& host, int port){ boost::bind(&RdmaConnector::connectionError, this, poller, _1, _2), boost::bind(&RdmaConnector::disconnected, this, poller, _1), boost::bind(&RdmaConnector::rejected, this, poller, _1, _2)); - c->start(poller); - polling = true; + + c->start(poller); } // The following only gets run when connected @@ -187,11 +187,12 @@ void RdmaConnector::connected(Poller::shared_ptr poller, Rdma::Connection::intru boost::bind(&RdmaConnector::writebuff, this, _1), 0, // write buffers full boost::bind(&RdmaConnector::eof, this, _1)); // data error - just close connection - aio->start(poller); identifier = str(format("[%1% %2%]") % ci->getLocalName() % ci->getPeerName()); ProtocolInitiation init(version); writeDataBlock(init); + + aio->start(poller); } void RdmaConnector::connectionError(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr&, Rdma::ErrorType) { |