activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1066935 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs
Date Thu, 03 Feb 2011 20:05:39 GMT
Author: tabish
Date: Thu Feb  3 20:05:39 2011
New Revision: 1066935

URL: http://svn.apache.org/viewvc?rev=1066935&view=rev
Log:
Add check for failed transport in the shutdown code, don't try and send remove info if it
is, avoids logging an error for no reason.

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

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs?rev=1066935&r1=1066934&r2=1066935&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs Thu Feb
 3 20:05:39 2011
@@ -544,7 +544,10 @@ namespace Apache.NMS.ActiveMQ
                     }
                     sessions.Clear();
 
-                    if(connected.Value)
+                    // Connected is true only when we've successfully sent our ConnectionInfo
+                    // to the broker, so if we haven't announced ourselves there's no need
to
+                    // inform the broker of a remove, and if the transport is failed, why
bother.
+                    if(connected.Value && !transportFailed.Value)
                     {
                         DisposeOf(ConnectionId);
                         ShutdownInfo shutdowninfo = new ShutdownInfo();



Mime
View raw message