From 22dbf976702af5487d14153f30becd2055140f76 Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Tue, 31 Jul 2001 00:34:27 +0000 Subject: [PATCH] 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 --- server/connection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/connection.c b/server/connection.c index 70f9fc29ba..5356c7bd47 100644 --- a/server/connection.c +++ b/server/connection.c @@ -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); -- 2.40.0