From 9b0de5f155f957a912731bca6dc4abbb90f22940 Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Wed, 14 Feb 2001 21:29:12 +0000 Subject: [PATCH] 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 --- server/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.50.1