MINOR: mux-h2: add the expire task and its expiration date in "show fd"

Some issues such as #1929 seem to involve a task without timeout but we
can't find the condition to reproduce this in the code. However, not having
this info in the output doesn't help, so this patch adds the task pointer
and its timeout (when the task is non-null). It may be useful to backport
it.

(cherry picked from commit f8c7709013)
[cf: changes applied in h2_show_fd()]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
Willy Tarreau 2022-11-29 15:26:43 +01:00 committed by Christopher Faulet
parent 3da16eabd4
commit 37a325bdc9

View File

@ -6771,6 +6771,13 @@ static int h2_show_fd(struct buffer *msg, struct connection *conn)
(unsigned int)b_data(tmbuf), b_orig(tmbuf),
(unsigned int)b_head_ofs(tmbuf), (unsigned int)b_size(tmbuf));
chunk_appendf(msg, " .task=%p", h2c->task);
if (h2c->task) {
chunk_appendf(msg, " .exp=%s",
h2c->task->expire ? tick_is_expired(h2c->task->expire, now_ms) ? "<PAST>" :
human_time(TICKS_TO_MS(h2c->task->expire - now_ms), TICKS_TO_MS(1000)) : "<NEVER>");
}
if (h2s) {
chunk_appendf(msg, " last_h2s=%p .id=%d .st=%s .flg=0x%04x .rxbuf=%u@%p+%u/%u .sc=%p",
h2s, h2s->id, h2s_st_to_str(h2s->st), h2s->flags,