]> granicus.if.org Git - apache/commitdiff
Exit connection processing normally on a graceful shutdown (which will allow
authorBill Stoddard <stoddard@apache.org>
Thu, 11 May 2000 20:47:21 +0000 (20:47 +0000)
committerBill Stoddard <stoddard@apache.org>
Thu, 11 May 2000 20:47:21 +0000 (20:47 +0000)
a lingering close where applicable). Set is_graceful in the winnt MPM.

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

server/connection.c
server/mpm/winnt/mpm_winnt.c

index f07b6f150acac3db98cbfb01a97682eb0849b2ba..09bdc4861be4ee68eb9867305c952e93ea8c0664 100644 (file)
@@ -215,7 +215,7 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
 }
 
 int ap_process_http_connection(conn_rec *c)
-    {
+{
     request_rec *r;
 
     /*
@@ -238,11 +238,8 @@ int ap_process_http_connection(conn_rec *c)
         ap_update_connection_status(c->id, "Status", "Keepalive");
        ap_destroy_pool(r->pool);
 
-       if (ap_graceful_stop_signalled()) {
-           /* XXX: hey wait, this should do a lingering_close! */
-           ap_bclose(c->client);
-           return OK;
-       }
+       if (ap_graceful_stop_signalled())
+            break;
     }
 
     ap_reset_connection_status(c->id);
index 860adaa309da7f43fe24e486387e59b9c776cb35..dfa2d6414bb174e06dca0a8236257b737c2dd91e 100644 (file)
@@ -1238,8 +1238,10 @@ static void child_main()
         }
     }
 
-    /* Shutdown the worker threads */
+    /* Setting is_graceful will close keep-alive connections 
+    is_graceful = 1;
 
+    /* Shutdown the worker threads */
     if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
         for (i = 0; i < nthreads; i++) {
             add_job(-1);