activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1051618 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
Date Tue, 21 Dec 2010 19:17:05 GMT
Author: tabish
Date: Tue Dec 21 19:17:05 2010
New Revision: 1051618

URL: http://svn.apache.org/viewvc?rev=1051618&view=rev
Log:
partial fix for: https://issues.apache.org/jira/browse/AMQNET-294

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs?rev=1051618&r1=1051617&r2=1051618&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
Tue Dec 21 19:17:05 2010
@@ -329,15 +329,6 @@ namespace Apache.NMS.ActiveMQ.Transport.
 			get { return this.updateURIsSupported; }
 		}
 
-		/// <summary>
-		/// </summary>
-		/// <param name="command"></param>
-		/// <returns>Returns true if the command is one sent when a connection is being closed.</returns>
-		private static bool IsShutdownCommand(Command command)
-		{
-			return (command != null && (command.IsShutdownInfo || command is RemoveInfo));
-		}
-
 		public void OnException(ITransport sender, Exception error)
 		{
 			try
@@ -540,7 +531,7 @@ namespace Apache.NMS.ActiveMQ.Transport.
 
 			lock(reconnectMutex)
 			{
-				if(IsShutdownCommand(command) && ConnectedTransport == null)
+				if(command != null && ConnectedTransport == null)
 				{
 					if(command.IsShutdownInfo)
 					{
@@ -548,9 +539,10 @@ namespace Apache.NMS.ActiveMQ.Transport.
 						return;
 					}
 
-					if(command.IsRemoveInfo)
+					if(command.IsRemoveInfo || command.IsMessageAck)
 					{
-						// Simulate response to RemoveInfo command
+						// Simulate response to RemoveInfo command or a MessageAck
+                        // since it would be stale at this point.
 						OnCommand(this, new Response() { CorrelationId = command.CommandId });
 						return;
 					}



Mime
View raw message