From: Willy Tarreau Date: Fri, 10 Feb 2023 15:53:35 +0000 (+0100) Subject: BUG/MINOR: clock/stats: also use start_time not start_date in HTML info X-Git-Tag: v2.8-dev4~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b685ad0774a6b4040f0422b4f3c2ddae9de0cade;p=thirdparty%2Fhaproxy.git BUG/MINOR: clock/stats: also use start_time not start_date in HTML info For an unknown reason in the change of uptime calculation for the HTML page didn't make it to commit 6093ba47c ("BUG/MINOR: clock: do not mix wall-clock and monotonic time in uptime calculation"). Let's address it as well otherwise the stats page will display an incorrect uptime. No backport needed unless the patch above is backported. --- diff --git a/src/stats.c b/src/stats.c index 9866a54747..4ee8e868a8 100644 --- a/src/stats.c +++ b/src/stats.c @@ -3537,7 +3537,7 @@ static void stats_dump_html_info(struct stconn *sc, struct uri_auth *uri) { struct appctx *appctx = __sc_appctx(sc); struct show_stat_ctx *ctx = appctx->svcctx; - unsigned int up = (now.tv_sec - start_date.tv_sec); + unsigned int up = (now.tv_sec - start_time.tv_sec); char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN]; const char *scope_ptr = stats_scope_ptr(appctx, sc); unsigned long long bps;