]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h1: Reset session dates and durations info when the CS is detached
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 5 Oct 2020 09:35:17 +0000 (11:35 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Dec 2020 13:41:48 +0000 (14:41 +0100)
These info are reset for the next transaction, if the connection is kept
alive. From the stream point of view, it should be the same a new
connection, except there is no handshake. Thus the handshake duration is set
to 0.

src/mux_h1.c

index cb1adddbc21bee253b64666474cb607b5fe2b8a2..1a56702b1eafe1d7b255c4adda8c57c24a17febf 100644 (file)
@@ -2474,6 +2474,11 @@ static void h1_detach(struct conn_stream *cs)
        h1c = h1s->h1c;
        h1s->cs = NULL;
 
+       sess->accept_date = date;
+       sess->tv_accept   = now;
+       sess->t_handshake = 0;
+       sess->t_idle      = -1;
+
        is_not_first = h1s->flags & H1S_F_NOT_FIRST;
        h1s_destroy(h1s);