Skip to content

Commit

Permalink
https://issues.apache.org/jira/browse/AMQCPP-501
Browse files Browse the repository at this point in the history
If no messages delivered to client we don't need to remain in the TX, just close as normal so that prefetched messages get redispatched. 

git-svn-id: https://svn.apache.org/repos/asf/activemq/activemq-cpp/trunk@1504502 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Timothy A. Bish committed Jul 18, 2013
1 parent 4218916 commit 8c56eeb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ void ActiveMQConsumerKernel::close() {
try {
if (!this->isClosed()) {

if (this->session->getTransactionContext() != NULL &&
if (!this->internal->dispatchedMessages.isEmpty() &&
this->session->getTransactionContext() != NULL &&
this->session->getTransactionContext()->isInTransaction() &&
this->internal->closeSyncRegistered.compareAndSet(false, true)) {

Expand Down

0 comments on commit 8c56eeb

Please sign in to comment.