]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: server: Also call srv_reset_path_parameters() on srv up
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 4 Nov 2025 17:37:20 +0000 (18:37 +0100)
committerOlivier Houchard <cognet@ci0.org>
Tue, 4 Nov 2025 17:47:34 +0000 (18:47 +0100)
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.

src/server.c

index 7812a22d018f97bb294965373c5f68d18969515f..a151566012cb40b2a04926105f8ac8ed35520961 100644 (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);