]> granicus.if.org Git - apache/commitdiff
Only health-check workers which are not STOPPED
authorJim Jagielski <jim@apache.org>
Wed, 3 Feb 2016 14:30:53 +0000 (14:30 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 3 Feb 2016 14:30:53 +0000 (14:30 +0000)
Only log Checking if we are actually checking

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

modules/proxy/mod_proxy_hcheck.c

index d861687e18fd5f93a6b84f6a0ff5d2e77f783e97..77f2c6dce8112d87e603f717d4aa1b1a5c162835 100644 (file)
@@ -905,14 +905,16 @@ static apr_status_t hc_watchdog_callback(int state, void *data,
                     workers = (proxy_worker **)balancer->workers->elts;
                     for (n = 0; n < balancer->workers->nelts; n++) {
                         worker = *workers;
-                        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
-                                     "Checking %s worker: %s  [%d] (%pp)", balancer->s->name,
-                                     worker->s->name, worker->s->method, worker);
-                        if ((worker->s->method != NONE) && (now > worker->s->updated + worker->s->interval)) {
+                        if (!PROXY_WORKER_IS(worker, PROXY_WORKER_STOPPED) &&
+                           (worker->s->method != NONE) &&
+                           (now > worker->s->updated + worker->s->interval)) {
                             baton_t *baton;
                             /* This pool must last the lifetime of the (possible) thread */
                             apr_pool_t *ptemp;
                             apr_pool_create(&ptemp, ctx->p);
+                            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
+                                         "Checking %s worker: %s  [%d] (%pp)", balancer->s->name,
+                                         worker->s->name, worker->s->method, worker);
 
                             if ((rv = hc_init_worker(ctx, worker)) != APR_SUCCESS) {
                                 return rv;