activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1611168 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Date Wed, 16 Jul 2014 20:14:50 GMT
Author: tabish
Date: Wed Jul 16 20:14:50 2014
New Revision: 1611168

URL: http://svn.apache.org/r1611168
Log:
https://issues.apache.org/jira/browse/AMQNET-483

Ensure the the ConsumerCloseSynchronization doesn't try to close the same consumer more than
once.
Fixes [AMQNET-AMQNET-483]. (See https://issues.apache.org/jira/browse/AMQNET-AMQNET-483)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=1611168&r1=1611167&r2=1611168&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Wed Jul 16 20:14:50 2014
@@ -1810,16 +1810,22 @@ namespace Apache.NMS.ActiveMQ
 
 			public void AfterCommit()
 			{
-                Tracer.DebugFormat("ConsumerCloseSynchronization - AfterCommit Called for
Consumer {0}.",
-                                   this.consumer.ConsumerId);
-                this.consumer.DoClose();
+                if (!this.consumer.Closed) 
+                {
+                    Tracer.DebugFormat("ConsumerCloseSynchronization - AfterCommit Called
for Consumer {0}.",
+                                       this.consumer.ConsumerId);
+                    this.consumer.DoClose();
+                }
 			}
 
 			public void AfterRollback()
 			{
-                Tracer.DebugFormat("ConsumerCloseSynchronization - AfterRollback Called for
Consumer {0}.",
-                                   this.consumer.ConsumerId);
-                this.consumer.DoClose();
+                if (!this.consumer.Closed) 
+                {
+                    Tracer.DebugFormat("ConsumerCloseSynchronization - AfterRollback Called
for Consumer {0}.",
+                                       this.consumer.ConsumerId);
+                    this.consumer.DoClose();
+                }
 			}
 		}
 



Mime
View raw message