From: Bill Stoddard Date: Wed, 14 Feb 2001 21:29:12 +0000 (+0000) Subject: Move the call to set the socket timeout outside the loop. X-Git-Tag: 2.0.11~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b0de5f155f957a912731bca6dc4abbb90f22940;p=apache Move the call to set the socket timeout outside the loop. ve : git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88168 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/connection.c b/server/connection.c index 703c600c3f..bbbc090fbb 100644 --- a/server/connection.c +++ b/server/connection.c @@ -192,8 +192,8 @@ void ap_lingering_close(conn_rec *c) * which seems to work well), close the connection. */ timeout = SECONDS_TO_LINGER * APR_USEC_PER_SEC; + apr_setsocketopt(c->client_socket, APR_SO_TIMEOUT, timeout); for (;;) { - 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;