summaryrefslogtreecommitdiff
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
commit74572dd5127e644093f2820e59a2b27df1720618 (patch)
treed42a183c4be262dc8af9e69bd6f28f913ef03d61
parente07183890d575d128d83035f869ae0c7eff6ea6b (diff)
downloadqpid-python-74572dd5127e644093f2820e59a2b27df1720618.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/qpid@954491 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/src/qpid/sys/rdma/RdmaIO.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/cpp/src/qpid/sys/rdma/RdmaIO.cpp
index 6f81450a0c..32bd9cd96b 100644
--- a/cpp/src/qpid/sys/rdma/RdmaIO.cpp
+++ b/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;
}