Commit 53a5a10f authored by Bill Stoddard's avatar Bill Stoddard
Browse files

The read() in apr_recv() would always be called first and return EAGAIN.

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
parent 9f193bac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);