From: Jeff Trawick Date: Wed, 1 Nov 2000 15:42:50 +0000 (+0000) Subject: Fix a buglet in the APR-ization of ap_lingering_close() -- use APR_SO_TIMEOUT X-Git-Tag: APACHE_2_0_ALPHA_8~209 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2730adb574ac21825bdcae16c3b1c713c2522ee7;p=apache Fix a buglet in the APR-ization of ap_lingering_close() -- use APR_SO_TIMEOUT instead of BO_TIMEOUT. (We were actually setting a different socket option.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86785 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/connection.c b/server/connection.c index 9d3553d0e5..c96d146cdf 100644 --- a/server/connection.c +++ b/server/connection.c @@ -185,7 +185,8 @@ void ap_lingering_close(conn_rec *c) * to the peer. */ - if (apr_shutdown(c->client_socket, 1) != APR_SUCCESS || c->aborted) { + if (apr_shutdown(c->client_socket, APR_SHUTDOWN_WRITE) != APR_SUCCESS || + c->aborted) { apr_close_socket(c->client_socket); return; } @@ -197,7 +198,7 @@ void ap_lingering_close(conn_rec *c) start = apr_now(); timeout = MAX_SECS_TO_LINGER * APR_USEC_PER_SEC; for (;;) { - apr_setsocketopt(c->client_socket, BO_TIMEOUT, timeout); + apr_setsocketopt(c->client_socket, APR_SO_TIMEOUT, timeout); nbytes = sizeof(dummybuf); rc = apr_recv(c->client_socket, dummybuf, &nbytes); if (rc != APR_SUCCESS || nbytes == 0) break;