From: Christopher Faulet Date: Mon, 28 Oct 2024 06:43:05 +0000 (+0100) Subject: DEBUG: mux-h1: Add H1C expiration dates in trace messages X-Git-Tag: v3.1-dev11~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fa5b379fac9e9baaa0a6114b27b92b41a97d563;p=thirdparty%2Fhaproxy.git DEBUG: mux-h1: Add H1C expiration dates in trace messages The expiration date of the H1C task and the H1C idle expiration date are now dumped in the trace messages. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index c87849d0f6..7075b28d5e 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -416,6 +416,15 @@ static void h1_trace(enum trace_level level, uint64_t mask, const struct trace_s chunk_appendf(&trace_buf, " - h1c=%p(0x%08x)", h1c, h1c->flags); if (h1c->conn) chunk_appendf(&trace_buf, " conn=%p(0x%08x)", h1c->conn, h1c->conn->flags); + chunk_appendf(&trace_buf, " .task=%p", h1c->task); + if (h1c->task) { + chunk_appendf(&trace_buf, " .exp=%s", + h1c->task->expire ? tick_is_expired(h1c->task->expire, now_ms) ? "" : + human_time(TICKS_TO_MS(h1c->task->expire - now_ms), TICKS_TO_MS(1000)) : ""); + } + chunk_appendf(&trace_buf, " .idle_exp=%s", + h1c->idle_exp ? tick_is_expired(h1c->idle_exp, now_ms) ? "" : + human_time(TICKS_TO_MS(h1c->idle_exp - now_ms), TICKS_TO_MS(1000)) : ""); if (h1s) { chunk_appendf(&trace_buf, " h1s=%p(0x%08x)", h1s, h1s->flags); if (h1s->sd)