diff options
author | Andrew Stitcher <astitcher@apache.org> | 2010-09-08 16:49:50 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2010-09-08 16:49:50 +0000 |
commit | 90ed79ef1ea673df63e85adf9c355226f8bbc1df (patch) | |
tree | a001f1f8c5302ee4eb2d1119cf9a7c6d8b34538e /cpp/src | |
parent | fd899eebc640d7e3c72ee71282936fd138ee1378 (diff) | |
download | qpid-python-90ed79ef1ea673df63e85adf9c355226f8bbc1df.tar.gz |
Delay client side Rdma connection disconnect() so that it happens serialised
to the data channel for the connection.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@995144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/RdmaConnector.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index e5be1f8fbf..f8f38fb050 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/cpp/src/qpid/client/RdmaConnector.cpp @@ -82,7 +82,8 @@ class RdmaConnector : public Connector, public sys::Codec // Callbacks void connected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&); void connectionError(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, Rdma::ErrorType); - void disconnected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr); + void disconnectAction(); + void disconnected(); void rejected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&); void readbuff(Rdma::AsynchIO&, Rdma::Buffer*); @@ -176,7 +177,7 @@ void RdmaConnector::connect(const std::string& host, int port){ Rdma::ConnectionParams(maxFrameSize, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&RdmaConnector::connected, this, poller, _1, _2), boost::bind(&RdmaConnector::connectionError, this, poller, _1, _2), - boost::bind(&RdmaConnector::disconnected, this, poller, _1), + boost::bind(&RdmaConnector::disconnected, this), boost::bind(&RdmaConnector::rejected, this, poller, _1, _2))); polling = true; @@ -228,7 +229,7 @@ void RdmaConnector::connectionError(sys::Poller::shared_ptr, Rdma::Connection::i stopped(); } -void RdmaConnector::disconnected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr) { +void RdmaConnector::disconnectAction() { QPID_LOG(debug, "Connection disconnected " << identifier); { Mutex::ScopedLock l(pollingLock); @@ -239,6 +240,10 @@ void RdmaConnector::disconnected(sys::Poller::shared_ptr, Rdma::Connection::intr drained(); } +void RdmaConnector::disconnected() { + aio->requestCallback(boost::bind(&RdmaConnector::disconnectAction, this)); +} + void RdmaConnector::rejected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams& cp) { QPID_LOG(debug, "Connection Rejected " << identifier << ": " << cp.maxRecvBufferSize); { |