activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r911622 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp: Connection.cs Session.cs
Date Thu, 18 Feb 2010 22:29:24 GMT
Author: tabish
Date: Thu Feb 18 22:29:24 2010
New Revision: 911622

URL: http://svn.apache.org/viewvc?rev=911622&view=rev
Log:
Fix for: https://issues.apache.org/activemq/browse/AMQNET-235

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Connection.cs?rev=911622&r1=911621&r2=911622&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Connection.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Connection.cs
Thu Feb 18 22:29:24 2010
@@ -765,11 +765,19 @@
 
         protected void OnTransportInterrupted(ITransport sender)
         {
-            Tracer.Debug("Transport has been Interrupted.");
+            Tracer.Debug("Connection: Transport has been Interrupted.");
 
             foreach(Session session in this.sessions)
             {
-                session.ClearMessagesInProgress();
+				try
+				{
+                	session.ClearMessagesInProgress();
+				}
+				catch(Exception ex)
+				{
+					Tracer.Warn("Exception while clearing messages: " + ex.Message);
+					Tracer.Warn(ex.StackTrace);
+				}
             }
 
             if(this.ConnectionInterruptedListener != null && !this.closing )

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Session.cs?rev=911622&r1=911621&r2=911622&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Session.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.2.x/src/main/csharp/Session.cs
Thu Feb 18 22:29:24 2010
@@ -807,7 +807,7 @@
 
             lock(this.consumers.SyncRoot)
             {
-                foreach(MessageConsumer consumer in this.consumers)
+                foreach(MessageConsumer consumer in this.consumers.Values)
                 {
                     consumer.ClearMessagesInProgress();
                 }



Mime
View raw message