]> granicus.if.org Git - apache/commitdiff
Fix a buglet in the APR-ization of ap_lingering_close() -- use APR_SO_TIMEOUT
authorJeff Trawick <trawick@apache.org>
Wed, 1 Nov 2000 15:42:50 +0000 (15:42 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 1 Nov 2000 15:42:50 +0000 (15:42 +0000)
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

server/connection.c

index 9d3553d0e55e922482e148cc9b1480df790dd8be..c96d146cdf234dbdb1aae126bec38397b3624e91 100644 (file)
@@ -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;