]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Set the health to unknown when exiting so that httpd
authorJean-Frederic Clere <jfclere@apache.org>
Thu, 3 Aug 2006 19:50:55 +0000 (19:50 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Thu, 3 Aug 2006 19:50:55 +0000 (19:50 +0000)
could its retry logic.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-proxy-scoreboard@428503 13f79535-47bb-0310-9956-ffa450edef68

support/proxymonitor.c

index c262c7d649743bf6c62dc337433d7d08213a35da..7d035fc5e1f14663bd3bb9cf44e186e595030b2e 100644 (file)
@@ -202,6 +202,16 @@ int process_sharedmem(apr_pool_t *pool, int num)
     }
     return APR_SUCCESS;
 }
+/*
+ * When stopping write health = unknown
+ */
+void markunknown_sharedmem(apr_pool_t *pool, int num)
+{
+    int n;
+
+    for (n = 0; n < num; n++)
+        worker_storage->set_health(n, HEALTH_UNKNOWN);
+}
 
 /*
  * main
@@ -309,6 +319,8 @@ int main(int argc, const char * const argv[])
         apr_pool_destroy(instance);
         /* If something goes really wrong we should clean all, via apr_pool_destroy(instance_socket) */
     }
+    if (instance_socket != NULL)
+        markunknown_sharedmem(instance_socket, num);
     if (interrupted) {
         apr_file_printf(errfile, "Monitoring aborted due to user "
                                  "request." APR_EOL_STR);