From b93714f586d1ebe5acd6820669eb21a35f5752fb Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 8 Aug 2011 09:57:05 +0000 Subject: [PATCH] Correctly indicate if socket is closing when calling recycle for the AJP NIO processor. Note since the flag is unused in this case there were no bugs triggered by the re-factoring error. (rjung) git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1154897 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/coyote/ajp/AjpNioProcessor.java | 6 +++--- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/java/org/apache/coyote/ajp/AjpNioProcessor.java b/java/org/apache/coyote/ajp/AjpNioProcessor.java index 84cab1338..abf73fb66 100644 --- a/java/org/apache/coyote/ajp/AjpNioProcessor.java +++ b/java/org/apache/coyote/ajp/AjpNioProcessor.java @@ -128,14 +128,14 @@ public class AjpNioProcessor extends AbstractAjpProcessor { } catch (IOException e) { error = true; } - recycle(true); + recycle(false); continue; } else if(type != Constants.JK_AJP13_FORWARD_REQUEST) { // Usually the servlet didn't read the previous request body if(log.isDebugEnabled()) { log.debug("Unexpected message: "+type); } - recycle(false); + recycle(true); continue; } request.setStartTime(System.currentTimeMillis()); @@ -217,7 +217,7 @@ public class AjpNioProcessor extends AbstractAjpProcessor { socket.setTimeout(keepAliveTimeout); } - recycle(true); + recycle(false); } rp.setStage(org.apache.coyote.Constants.STAGE_ENDED); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index d55b8db20..48e9eff8e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -179,6 +179,11 @@ Set reuse flag of final AJP END_RESPONSE packet to 0 if we plan to close the connection. (rjung) + + Correctly indicate if socket is closing when calling recycle for the AJP + NIO processor. Note since the flag is unused in this case there were no + bugs triggered by the re-factoring error. (rjung) + -- 2.11.0