diff options
author | Alan Conway <aconway@apache.org> | 2011-09-30 20:55:54 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2011-09-30 20:55:54 +0000 |
commit | 8cd031e3e848a43b64a8bcec0d30783d558a73f0 (patch) | |
tree | 560e2bf30d03db282307ea94257f5f96f53332a9 | |
parent | c3716ef1008e7aceab1071ea0b6510321d2421f5 (diff) | |
download | qpid-python-8cd031e3e848a43b64a8bcec0d30783d558a73f0.tar.gz |
QPID-2920: Fix race condition causing sporadic duplicate messages.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-2920-active@1177831 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index 0b43fd958e..9023a3b07d 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -303,8 +303,8 @@ bool Queue::getNextMessage(QueuedMessage& m, Consumer::shared_ptr c) Queue::ConsumeCode Queue::consumeNextMessage(QueuedMessage& m, Consumer::shared_ptr c) { while (true) { - ClusterAcquireScope acquireScope; // Outside the lock Activity::Scope consumeScope(consuming); + ClusterAcquireScope acquireScope; Mutex::ScopedLock locker(messageLock); if (!consumeScope) { QPID_LOG(trace, "Queue stopped, can't consume: " << name); |