MINOR: server: startup slowstart task when using seamless reload of HAProxy
This patch uses the start up of the health check task to also start
the warmup task when required.
This is executed only once: when HAProxy has just started up and can
be started only if the load-server-state-from-file feature is enabled
and the server was in the warmup state before a reload occurs.
diff --git a/src/checks.c b/src/checks.c
index eeff4ea..ade2428 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -2295,6 +2295,9 @@
t->process = server_warmup;
t->context = s;
t->expire = TICK_ETERNITY;
+ /* server can be in this state only because of */
+ if (s->state == SRV_ST_STARTING)
+ task_schedule(s->warmup, tick_add(now_ms, MS_TO_TICKS(MAX(1000, (now.tv_sec - s->last_change)) / 20)));
}
if (s->check.state & CHK_ST_CONFIGURED) {