Author: markt Date: Fri Aug 14 06:48:26 2015 New Revision: 1695824 URL: http://svn.apache.org/r1695824 Log: Align NIO and APR and reset the socket timeout before the socket is added to the Poller. May help with the fix for bug 58157.
Modified: tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Modified: tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1695824&r1=1695823&r2=1695824&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Fri Aug 14 06:48:26 2015 @@ -163,6 +163,10 @@ public class AjpNioProtocol extends Abst processor.recycle(isSocketClosing); recycledProcessors.push(processor); if (addToPoller) { + // The only time this method is called with addToPoller == true + // is when the socket is in keep-alive so set the appropriate + // timeout. + socket.setTimeout(getProtocol().getKeepAliveTimeout()); socket.getSocket().getPoller().add(socket.getSocket()); } } Modified: tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1695824&r1=1695823&r2=1695824&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Fri Aug 14 06:48:26 2015 @@ -219,6 +219,10 @@ public class Http11NioProtocol extends A processor.recycle(isSocketClosing); recycledProcessors.push(processor); if (addToPoller) { + // The only time this method is called with addToPoller == true + // is when the socket is in keep-alive so set the appropriate + // timeout. + socket.setTimeout(getProtocol().getKeepAliveTimeout()); socket.getSocket().getPoller().add(socket.getSocket()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org