Adjusted Ajp13Processor's run() method to protect against unexpected
unchecked excpetions, preventing the possibility of a leak in
Ajp13Connector's request processor pool.

Index: Ajp13Processor.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/Ajp13Processor.java,v
retrieving revision 1.9
diff -u -u -r1.9 Ajp13Processor.java
--- Ajp13Processor.java 7 Jun 2002 18:54:21 -0000       1.9
+++ Ajp13Processor.java 6 Nov 2002 08:01:14 -0000
@@ -547,14 +547,16 @@
                 logger.log("socket assigned.");
             }
 
-           // Process the request from this socket
-           process(socket);
-
-           // Finish up this request
-            if (debug > 0) {
-                logger.log("recycling myself ...");
+            try {
+                // Process the request from this socket
+                process(socket);
+            } finally {
+                // Finish up this request
+                if (debug > 0) {
+                    logger.log("recycling myself ...");
+                }
+                connector.recycle(this);
             }
-           connector.recycle(this);
        }
 
        // Tell threadStop() we have shut ourselves down successfully



On another note, what's the most robust Java and Apache httpd
connector code bases these days for Tomcat 4.1?  Not trying to start a
religious war -- interested in your opinions.  Please send me to the
appropriate docs if this is a RTFM question.

Thanks!
-- 

Daniel Rall <[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to