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 | a7fffaaf5ca8e373b50ab857d924d655cbe3453e (patch) | |
| tree | be2277dad49d50b13c50e4959b24b31e4447cc33 /qpid/cpp | |
| parent | 12bdce03b8f31645393f42b7e4683debec1a2308 (diff) | |
| download | qpid-python-a7fffaaf5ca8e373b50ab857d924d655cbe3453e.tar.gz | |
Fix a potential RDMA connect failure race
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@901551 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/client/RdmaConnector.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/client/RdmaConnector.cpp b/qpid/cpp/src/qpid/client/RdmaConnector.cpp index e51ee95c61..d67a0fcb2e 100644 --- a/qpid/cpp/src/qpid/client/RdmaConnector.cpp +++ b/qpid/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) { |
