You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2007/05/08 13:00:07 UTC

svn commit: r536159 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Author: fhanik
Date: Tue May  8 04:00:06 2007
New Revision: 536159

URL: http://svn.apache.org/viewvc?view=rev&rev=536159
Log:
mimic APR behavior and do stuff according to document, TIMEOUT should not close the connection

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

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=536159&r1=536158&r2=536159
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May  8 04:00:06 2007
@@ -1389,9 +1389,10 @@
                     //processSocket(ka.getChannel(), status, dispatch);
                     ka.setComet(false);//to avoid a loop
                     processSocket(ka.getChannel(), status, false);//don't dispatch if the lines below are cancelling the key
+                    if (status == SocketStatus.TIMEOUT ) return; // don't close on comet timeout
                 }
                 if (key.isValid()) key.cancel();
-                if (key.channel().isOpen()) key.channel().close();
+                if (key.channel().isOpen()) try {key.channel().close();}catch (Exception ignore){}
                 try {ka.channel.close(true);}catch (Exception ignore){}
                 key.attach(null);
             } catch (Throwable e) {



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