Port sendfile fix from 6.0.x to trunk
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 16 Nov 2008 20:54:03 +0000 (20:54 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 16 Nov 2008 20:54:03 +0000 (20:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@718115 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/AprEndpoint.java

index 57a929a..6b0cebd 100644 (file)
@@ -1797,11 +1797,9 @@ public class AprEndpoint {
                                     // Destroy file descriptor pool, which should close the file
                                     Pool.destroy(state.fdpool);
                                     Socket.timeoutSet(state.socket, soTimeout * 1000);
-                                    // If all done hand this socket off to a worker for
+                                    // If all done put the socket back in the poller for
                                     // processing of further requests
-                                    if (!processSocket(state.socket)) {
-                                        Socket.destroy(state.socket);
-                                    }
+                                    getPoller().add(state.socket);
                                 } else {
                                     // Close the socket since this is
                                     // the end of not keep-alive request.