summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-09-08 16:47:07 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-09-08 16:47:07 +0000
commit72e3a776d9b0eedf9519b67c900e6006f100d90a (patch)
tree232a77bfd6a400116f03de4d5270c416279653cd /qpid/cpp
parentcec4f54d2ad78420ee72f4e4a6f109eeff1768f6 (diff)
downloadqpid-python-72e3a776d9b0eedf9519b67c900e6006f100d90a.tar.gz
Remove write after frees in Rdma::AsynchIO and qpid::client::RdmaConnector
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@995134 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/client/RdmaConnector.cpp3
-rw-r--r--qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/client/RdmaConnector.cpp b/qpid/cpp/src/qpid/client/RdmaConnector.cpp
index f317fb9e4d..83a7191286 100644
--- a/qpid/cpp/src/qpid/client/RdmaConnector.cpp
+++ b/qpid/cpp/src/qpid/client/RdmaConnector.cpp
@@ -277,8 +277,9 @@ void RdmaConnector::drained() {
QPID_LOG(debug, "RdmaConnector::drained " << identifier);
assert(!polling);
if (aio) {
- aio->stop(boost::bind(&RdmaConnector::stopped, this, aio));
+ Rdma::AsynchIO* a = aio;
aio = 0;
+ a->stop(boost::bind(&RdmaConnector::stopped, this, a));
}
}
diff --git a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
index a72ed12af7..52de923248 100644
--- a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
+++ b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
@@ -327,10 +327,11 @@ namespace Rdma {
}
// If we've got all the write confirmations and we're draining
+ // We might get deleted in the drained callback so return immediately
if (draining) {
if (outstandingWrites == 0) {
- doDrainedCallback();
draining = false;
+ doDrainedCallback();
}
return;
}