tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1346932 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Date Wed, 06 Jun 2012 15:11:00 GMT
Author: markt
Date: Wed Jun  6 15:10:59 2012
New Revision: 1346932

URL: http://svn.apache.org/viewvc?rev=1346932&view=rev
Log:
Fix (hopefully) persistent failure of Comet unit test for connector stop when the END event
is not received

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1346932&r1=1346931&r2=1346932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  6 15:10:59 2012
@@ -1427,8 +1427,12 @@ public class NioEndpoint extends Abstrac
                             cancelledKey(key, SocketStatus.TIMEOUT);
                         }
                     } else if (ka.isAsync() || ka.getComet()) {
-                        // Async requests with a timeout of 0 or less never timeout
-                        if (!ka.isAsync() || ka.getTimeout() > 0) {
+                        if (close) {
+                            key.interestOps(0);
+                            ka.interestOps(0); //avoid duplicate stop calls
+                            processKey(key,ka);
+                        } else if (!ka.isAsync() || ka.getTimeout() > 0) {
+                            // Async requests with a timeout of 0 or less never timeout
                             long delta = now - ka.getLastAccess();
                             long timeout = (ka.getTimeout()==-1)?((long) socketProperties.getSoTimeout()):(ka.getTimeout());
                             boolean isTimedout = delta > timeout;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message