]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h1: Update session idle duration when data are received
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Sep 2020 11:47:09 +0000 (13:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Dec 2020 13:41:48 +0000 (14:41 +0100)
The session idle duration is set if not already done when data are
received. For now, this value is still unused.

src/mux_h1.c

index cc34bba3656df5398be9199c3e8ec8786e9cbbef..cb1adddbc21bee253b64666474cb607b5fe2b8a2 100644 (file)
@@ -2228,6 +2228,8 @@ static int h1_process(struct h1c * h1c)
 
        if (b_data(&h1c->ibuf) && h1s->csinfo.t_idle == -1)
                h1s->csinfo.t_idle = tv_ms_elapsed(&h1s->csinfo.tv_create, &now) - h1s->csinfo.t_handshake;
+       if (b_data(&h1c->ibuf) && h1s->sess->t_idle == -1)
+               h1s->sess->t_idle = tv_ms_elapsed(&h1s->sess->tv_accept, &now) - h1s->sess->t_handshake;
 
        if (conn_xprt_read0_pending(conn)) {
                h1s->flags |= H1S_F_REOS;