From 74572dd5127e644093f2820e59a2b27df1720618 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Mon, 14 Jun 2010 14:50:12 +0000 Subject: 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 --- cpp/src/qpid/sys/rdma/RdmaIO.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cpp/src') 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; } -- cgit v1.2.1