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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to