summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-05-08 18:22:19 +0000
committerGordon Sim <gsim@apache.org>2013-05-08 18:22:19 +0000
commit218421bb4ba1b193219ed4abd16dac4579710fba (patch)
tree54f01da7a9307b629c1bfb808d76e5bc9e534ebb /cpp/src
parent3e6b54ee76b9498d43189d6590386e8402988a4b (diff)
downloadqpid-python-218421bb4ba1b193219ed4abd16dac4579710fba.tar.gz
QPID-3189: correct calculated queue depth if enqueue fails
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1480389 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/Queue.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp
index 4d9a7f2a37..5e806699de 100644
--- a/cpp/src/qpid/broker/Queue.cpp
+++ b/cpp/src/qpid/broker/Queue.cpp
@@ -835,7 +835,12 @@ bool Queue::enqueue(TransactionContext* ctxt, Message& msg)
boost::intrusive_ptr<PersistableMessage> pmsg = msg.getPersistentContext();
assert(pmsg);
pmsg->enqueueAsync(shared_from_this(), store);
- store->enqueue(ctxt, pmsg, *this);
+ try {
+ store->enqueue(ctxt, pmsg, *this);
+ } catch (...) {
+ enqueueAborted(msg);
+ throw;
+ }
}
return true;
}