activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1057282 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
Date Mon, 10 Jan 2011 17:02:11 GMT
Author: tabish
Date: Mon Jan 10 17:02:11 2011
New Revision: 1057282

URL: http://svn.apache.org/viewvc?rev=1057282&view=rev
Log:
Fix a potential NPE

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs?rev=1057282&r1=1057281&r2=1057282&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
Mon Jan 10 17:02:11 2011
@@ -150,15 +150,13 @@ namespace Apache.NMS.Stomp.Transport
 
             if(!AllowReadCheck(elapsed))
             {
-                Tracer.Debug("Inactivity Monitor: A read check is not currently allowed.");
                 return;
             }
 
             this.lastReadCheckTime = now;
 
-            if(this.inRead.Value || this.failed.Value)
+            if(this.inRead.Value || this.failed.Value || this.asyncErrorTask == null)
             {
-                Tracer.Debug("A receive is in progress or already failed.");
                 return;
             }
 
@@ -182,7 +180,7 @@ namespace Apache.NMS.Stomp.Transport
         /// <returns></returns>
         public bool AllowReadCheck(TimeSpan elapsed)
         {
-            return (elapsed.TotalMilliseconds > readCheckTime );
+            return (elapsed.TotalMilliseconds > readCheckTime);
         }
         #endregion
 



Mime
View raw message