You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/04/17 17:07:54 UTC

svn commit: r1327129 - /activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp

Author: tabish
Date: Tue Apr 17 15:07:53 2012
New Revision: 1327129

URL: http://svn.apache.org/viewvc?rev=1327129&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-393

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=1327129&r1=1327128&r2=1327129&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp (original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp Tue Apr 17 15:07:53 2012
@@ -763,7 +763,11 @@ void ActiveMQConsumer::afterMessageIsCon
         }
 
         if( messageExpired == true ) {
-            ackLater( message, ActiveMQConstants::ACK_TYPE_DELIVERED );
+            synchronized(&this->internal->dispatchedMessages) {
+                this->internal->dispatchedMessages.remove(message);
+            }
+            ackLater(message, ActiveMQConstants::ACK_TYPE_DELIVERED);
+            return;
         }
 
         if( session->isTransacted() ) {