tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Switch socketClosing flag in AjpNioProcessor
Date Mon, 08 Aug 2011 09:34:39 GMT
I think in AjpNioProcessor the socketClosing flag is reversed. It is not
a functional problem, because reccyle() of AjpNioProcessor and of super
ignores it. But for consistency it should be switched. I'm not
committing straight away, because we are so close to tagging.

Mark: feel free to apply the patch if you think it's correct and harmless.

Otherwise I'll apply after the tag if there's no negative feedback until
then.

Index: java/org/apache/coyote/ajp/AjpNioProcessor.java
===================================================================
--- java/org/apache/coyote/ajp/AjpNioProcessor.java     (revision 1154852)
+++ java/org/apache/coyote/ajp/AjpNioProcessor.java     (working copy)
@@ -128,14 +128,14 @@
                     } 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 @@
                 socket.setTimeout(keepAliveTimeout);
             }

-            recycle(true);
+            recycle(false);
         }

         rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message