Author: markt
Date: Fri Jan 21 16:49:02 2011
New Revision: 1061900
URL: http://svn.apache.org/viewvc?rev=1061900&view=rev
Log:
Fix possible thread exhaustion
With a breakpoint in the servlet handling the timeout event, I was seeing a new
thread being allocated from the poll every second or so
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml
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=1061900&r1=1061899&r2=1061900&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Jan 21
16:49:02 2011
@@ -1387,6 +1387,8 @@ public class NioEndpoint extends Abstrac
long timeout = (ka.getTimeout()==-1)?((long)
socketProperties.getSoTimeout()):(ka.getTimeout());
boolean isTimedout = delta > timeout;
if (isTimedout) {
+ // Prevent subsequent timeouts if the timeout
event takes a while to process
+ ka.access(Long.MAX_VALUE);
processSocket(ka.getChannel(),
SocketStatus.TIMEOUT, true);
}
}//end if
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1061900&r1=1061899&r2=1061900&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 21 16:49:02 2011
@@ -90,6 +90,14 @@
</fix>
</changelog>
</subsection>
+ <subsection>
+ <changelog>
+ <fix>
+ Prevent possible thread exhaustion if a Comet timeout event takes a
+ while to complete. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]