]> granicus.if.org Git - apache/commitdiff
Move the call to set the socket timeout outside the loop.
authorBill Stoddard <stoddard@apache.org>
Wed, 14 Feb 2001 21:29:12 +0000 (21:29 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 14 Feb 2001 21:29:12 +0000 (21:29 +0000)
ve :

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88168 13f79535-47bb-0310-9956-ffa450edef68

server/connection.c

index 703c600c3f00b4d036280dd436a7a1492bd0ac06..bbbc090fbb7bb0ce8dcc0221963653f62a5dcb7b 100644 (file)
@@ -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;