You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/01/10 18:02:11 UTC
svn commit: r1057282 -
/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
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