summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:12 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:12 +0000
commit9d560565c5e468387ae54be3d599918fce2a3f16 (patch)
tree76b372e7502114eb9de1a74b4fc256a7070ec31b /qpid/cpp/src
parentfa287d67487ba5e14419fcdeca2b24e3cec86663 (diff)
downloadqpid-python-9d560565c5e468387ae54be3d599918fce2a3f16.tar.gz
Only set the draining flag when we delay calling the drained callback.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@954491 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
index 6f81450a0c..32bd9cd96b 100644
--- a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
+++ b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
@@ -130,8 +130,6 @@ namespace Rdma {
// Mark writing closed (so we don't accept any more writes or make any idle callbacks)
void AsynchIO::drainWriteQueue(NotifyCallback nc) {
- draining = true;
-
State oldState;
State newState;
bool doReturn;
@@ -149,6 +147,7 @@ namespace Rdma {
}
} while (!state.boolCompareAndSwap(oldState, newState));
if (doReturn) {
+ draining = true;
notifyCallback = nc;
return;
}