Author: rjung Date: Sat Sep 24 15:57:03 2011 New Revision: 1175182 URL: http://svn.apache.org/viewvc?rev=1175182&view=rev Log: Break from AJP CPING handling if endpoint is already paused.
Experimenting shows, that we will otherwise loose the following request. TC will not answer it, but mod_jk doesn't resend if properly configured. CPING is meant to detect this. Not 100% sure about the call to recycle(), but didn't find where else it would happen. Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1175182&r1=1175181&r2=1175182&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Sat Sep 24 15:57:03 2011 @@ -134,6 +134,10 @@ public class AjpAprProcessor extends Abs // not regular request processing int type = requestHeaderMessage.getByte(); if (type == Constants.JK_AJP13_CPING_REQUEST) { + if (endpoint.isPaused()) { + recycle(true); + break; + } if (Socket.send(socketRef, pongMessageArray, 0, pongMessageArray.length) < 0) { error = true; Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1175182&r1=1175181&r2=1175182&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Sat Sep 24 15:57:03 2011 @@ -118,6 +118,10 @@ public class AjpNioProcessor extends Abs // not regular request processing int type = requestHeaderMessage.getByte(); if (type == Constants.JK_AJP13_CPING_REQUEST) { + if (endpoint.isPaused()) { + recycle(true); + break; + } try { output(pongMessageArray, 0, pongMessageArray.length); } catch (IOException e) { Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1175182&r1=1175181&r2=1175182&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Sat Sep 24 15:57:03 2011 @@ -136,6 +136,10 @@ public class AjpProcessor extends Abstra // not regular request processing int type = requestHeaderMessage.getByte(); if (type == Constants.JK_AJP13_CPING_REQUEST) { + if (endpoint.isPaused()) { + recycle(true); + break; + } try { output.write(pongMessageArray); } catch (IOException e) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org