summaryrefslogtreecommitdiffstats
path: root/server/connection.c
diff options
context:
space:
mode:
authorBill Stoddard <stoddard@apache.org>2001-07-31 02:34:27 +0200
committerBill Stoddard <stoddard@apache.org>2001-07-31 02:34:27 +0200
commit22dbf976702af5487d14153f30becd2055140f76 (patch)
treea6a1b6271fc0e3a542c6fe633108991ebb8ec4da /server/connection.c
parent Register for %X, %c (we gotta make a decision, please vote if you care... (diff)
downloadapache2-22dbf976702af5487d14153f30becd2055140f76.tar.xz
apache2-22dbf976702af5487d14153f30becd2055140f76.zip
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
Diffstat (limited to 'server/connection.c')
-rw-r--r--server/connection.c1
1 files changed, 1 insertions, 0 deletions
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);