summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-09-08 16:49:50 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-09-08 16:49:50 +0000
commit9d1513709729ffc1396ce6639279ece78ac84b2a (patch)
treed37eef0157ca98fa84b422e3de6820816e42b48b /qpid/cpp
parent688d39f5a5ef4efbdb22ee23b87526744adcff23 (diff)
downloadqpid-python-9d1513709729ffc1396ce6639279ece78ac84b2a.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@995144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/client/RdmaConnector.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/client/RdmaConnector.cpp b/qpid/cpp/src/qpid/client/RdmaConnector.cpp
index e5be1f8fbf..f8f38fb050 100644
--- a/qpid/cpp/src/qpid/client/RdmaConnector.cpp
+++ b/qpid/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);
{