Maintain proper px->lbprm.tot_weight for log backends. server's weight is
considered as 1 as long as the server is usable.
This will allow the stats page to correctly display the proxy status since
the check currently relies on proxy's lbprm.tot_weight variable.
}
/* append the server to the list of available servers */
LIST_APPEND(&p->lbprm.log.avail, &srv->lb_list);
+
+ p->lbprm.tot_weight = (p->srv_act) ? p->srv_act : p->srv_bck;
}
static void log_backend_srv_up(struct server *srv)
/* reconstruct the array of usable servers */
_log_backend_srv_recalc(p);
+
+ p->lbprm.tot_weight = (p->srv_act) ? p->srv_act : p->srv_bck;
}
static void log_backend_srv_down(struct server *srv)