Skip to content

Commit 9fa5b37

Browse files
committed
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.
1 parent 976af31 commit 9fa5b37

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mux_h1.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,15 @@ static void h1_trace(enum trace_level level, uint64_t mask, const struct trace_s
416416
chunk_appendf(&trace_buf, " - h1c=%p(0x%08x)", h1c, h1c->flags);
417417
if (h1c->conn)
418418
chunk_appendf(&trace_buf, " conn=%p(0x%08x)", h1c->conn, h1c->conn->flags);
419+
chunk_appendf(&trace_buf, " .task=%p", h1c->task);
420+
if (h1c->task) {
421+
chunk_appendf(&trace_buf, " .exp=%s",
422+
h1c->task->expire ? tick_is_expired(h1c->task->expire, now_ms) ? "<PAST>" :
423+
human_time(TICKS_TO_MS(h1c->task->expire - now_ms), TICKS_TO_MS(1000)) : "<NEVER>");
424+
}
425+
chunk_appendf(&trace_buf, " .idle_exp=%s",
426+
h1c->idle_exp ? tick_is_expired(h1c->idle_exp, now_ms) ? "<PAST>" :
427+
human_time(TICKS_TO_MS(h1c->idle_exp - now_ms), TICKS_TO_MS(1000)) : "<NEVER>");
419428
if (h1s) {
420429
chunk_appendf(&trace_buf, " h1s=%p(0x%08x)", h1s, h1s->flags);
421430
if (h1s->sd)

0 commit comments

Comments
 (0)