]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
The read() in apr_recv() would always be called first and return EAGAIN.
authorBill Stoddard <stoddard@apache.org>
Tue, 31 Jul 2001 00:34:27 +0000 (00:34 +0000)
committerBill Stoddard <stoddard@apache.org>
Tue, 31 Jul 2001 00:34:27 +0000 (00:34 +0000)
This one change to eliminate the read unless there are really bytes to read
is good for a 7 to 9% performance boost on AIX.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89809 13f79535-47bb-0310-9956-ffa450edef68

server/connection.c

index 70f9fc29ba7e943f6c456754236442ccb339bf1d..5356c7bd47474518254dd4f8297e0c09613e008d 100644 (file)
@@ -195,6 +195,7 @@ void ap_lingering_close(conn_rec *c)
      */
     timeout = SECONDS_TO_LINGER * APR_USEC_PER_SEC;
     apr_setsocketopt(c->client_socket, APR_SO_TIMEOUT, timeout);
+    apr_setsocketopt(c->client_socket, APR_INCOMPLETE_READ, 1);
     for (;;) {
         nbytes = sizeof(dummybuf);
         rc = apr_recv(c->client_socket, dummybuf, &nbytes);