BUG/MEDIUM: server: Also call srv_reset_path_parameters() on srv up

Also call srv_reset_path_parameters() when the server changed states,
and got up. It is not enough to do it when the server goes down, because
there's a small race condition, and a connection could get established
just after we did it, and could have set the path parameters.

This does not need to be backported.
This commit is contained in:
Olivier Houchard 2025-11-04 18:37:20 +01:00 committed by Olivier Houchard
parent 7d4aa7b22b
commit 06821dc189

View File

@ -6728,6 +6728,7 @@ static int _srv_update_status_op(struct server *s, enum srv_op_st_chg_cause caus
if (s->next_state == SRV_ST_STARTING && s->warmup)
task_schedule(s->warmup, tick_add(now_ms, MS_TO_TICKS(MAX(1000, s->slowstart / 20))));
srv_reset_path_parameters(s);
server_recalc_eweight(s, 0);
/* now propagate the status change to any LB algorithms */
srv_lb_propagate(s);