summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/LocalQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.cpp')
-rw-r--r--cpp/src/qpid/client/LocalQueue.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp
index 09bf1e055a..7fbe4a053e 100644
--- a/cpp/src/qpid/client/LocalQueue.cpp
+++ b/cpp/src/qpid/client/LocalQueue.cpp
@@ -35,8 +35,11 @@ Message LocalQueue::pop() {
if (!queue)
throw ClosedException();
FrameSet::shared_ptr content = queue->pop();
- if (content->isA<MessageTransferBody>())
- return Message(*content, session);
+ if (content->isA<MessageTransferBody>()) {
+ Message m(*content, session);
+ autoAck.ack(m);
+ return m;
+ }
else
throw CommandInvalidException(
QPID_MSG("Unexpected method: " << content->getMethod()));