Correctly indicate if socket is closing when calling recycle for the AJP NIO processo...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 8 Aug 2011 09:57:05 +0000 (09:57 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 8 Aug 2011 09:57:05 +0000 (09:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1154897 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpNioProcessor.java
webapps/docs/changelog.xml

index 84cab13..abf73fb 100644 (file)
@@ -128,14 +128,14 @@ public class AjpNioProcessor extends AbstractAjpProcessor<NioChannel> {
                     } 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<NioChannel> {
                 socket.setTimeout(keepAliveTimeout);
             }
 
-            recycle(true);
+            recycle(false);
         }
         
         rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
index d55b8db..48e9eff 100644 (file)
         Set <code>reuse</code> flag of final AJP <code>END_RESPONSE</code>
         packet to <code>0</code> if we plan to close the connection. (rjung)
       </update>
+      <update>
+        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)
+      </update>
     </changelog>
   </subsection>
   <subsection name="Jasper">