diff options
| author | Alan Conway <aconway@apache.org> | 2008-11-11 20:58:59 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-11-11 20:58:59 +0000 |
| commit | b4c1da2bc72bec5e377217954fe62898e2f1c27a (patch) | |
| tree | cb1de75bc682e5f7798417141a4ec56481887590 /qpid/cpp/src | |
| parent | d581d25fbec73b7ad8cb18429e135e6331e0a394 (diff) | |
| download | qpid-python-b4c1da2bc72bec5e377217954fe62898e2f1c27a.tar.gz | |
Fix deadlock when Message::flush() re-enters IncompleteMessageList.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@713165 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/IncompleteMessageList.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/IncompleteMessageList.cpp b/qpid/cpp/src/qpid/broker/IncompleteMessageList.cpp index 64562dfb57..bfa7b5dd62 100644 --- a/qpid/cpp/src/qpid/broker/IncompleteMessageList.cpp +++ b/qpid/cpp/src/qpid/broker/IncompleteMessageList.cpp @@ -47,9 +47,12 @@ void IncompleteMessageList::process(const CompletionListener& listen, bool sync) boost::intrusive_ptr<Message>& msg = incomplete.front(); if (!msg->isEnqueueComplete()) { if (sync){ - msg->flush(); + { + sys::Mutex::ScopedUnlock u(lock); + msg->flush(); // Can re-enter IncompleteMessageList::enqueueComplete + } while (!msg->isEnqueueComplete()) - lock.wait(); + lock.wait(); } else { //leave the message as incomplete for now return; |
