Skip to content

Commit c507cca

Browse files
committed
Prevent wrong values for load
1 parent f5f93b6 commit c507cca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

native/mod_proxy_cluster/mod_proxy_cluster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ static proxy_worker *internal_find_best_byrequests(const proxy_balancer *balance
18331833
* Check that we could connect to the node and create corresponding balancers and workers.
18341834
* id : worker id
18351835
* load : load factor from the cluster manager.
1836-
* load > 0 : a load factor.
1836+
* load between 1 and 100: a load factor.
18371837
* load = 0 : standby worker.
18381838
* load = -1 : errored worker.
18391839
* load = -2 : just do a cping/cpong.
@@ -1923,7 +1923,7 @@ static int proxy_node_isup(request_rec *r, int id, int load)
19231923
} else if (load == 0) {
19241924
worker->s->status |= PROXY_WORKER_HOT_STANDBY;
19251925
worker->s->lbfactor = 0;
1926-
} else {
1926+
} else if (load >= 1 && load <= 100) {
19271927
worker->s->status &= ~PROXY_WORKER_IN_ERROR;
19281928
worker->s->status &= ~PROXY_WORKER_STOPPED;
19291929
worker->s->status &= ~PROXY_WORKER_DISABLED;

0 commit comments

Comments
 (0)