remm 2005/07/02 17:20:27 Modified: util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Hopefully fix the algorithm. The return value is according to the comments. - Open socket will be set to true if either the socket was already closed in sendfile or if it went to the sendfile poller. Revision Changes Path 1.56 +3 -4 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- AprEndpoint.java 2 Jul 2005 17:36:34 -0000 1.55 +++ AprEndpoint.java 3 Jul 2005 00:20:27 -0000 1.56 @@ -1155,9 +1155,8 @@ data.pos, data.end, 0); if (nw < 0) { if (!(-nw == Status.EAGAIN)) { - /* The socket will be destroyed on the - * return from the processSocket call - */ + Socket.destroy(data.socket); + data.socket = 0; return false; } else { // Break the loop and add the socket to poller. @@ -1184,7 +1183,7 @@ addS.add(data); addS.notify(); } - return true; + return false; } /** 1.20 +1 -4 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Http11AprProcessor.java 2 Jul 2005 17:36:35 -0000 1.19 +++ Http11AprProcessor.java 3 Jul 2005 00:20:27 -0000 1.20 @@ -886,12 +886,9 @@ sendfileData.socket = socket; sendfileData.keepAlive = keepAlive; if (!endpoint.getSendfile().add(sendfileData)) { - keepAlive = false; - openSocket = false; - } else { openSocket = true; + break; } - break; } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]