]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2/traces: report transition to SETTINGS1 before not after
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Aug 2022 13:30:41 +0000 (15:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Aug 2022 06:03:53 +0000 (08:03 +0200)
Traces indicating "switching to XXX" generally apply before the transition
so that the current connection state is visible in the trace. SETTINGS1
was incorrect in this regard, with the trace being emitted after. Let's
fix this.

No need to backport this, as this is purely cosmetic.

src/mux_h2.c

index f34941caebcbad27d2a4d51b8a389c5688b77e5f..e45e8f916b08266f79957c93ccf14801ad6c7ad2 100644 (file)
@@ -3312,8 +3312,8 @@ static void h2_process_demux(struct h2c *h2c)
                        TRACE_PROTO("received preface", H2_EV_RX_PREFACE, h2c->conn);
 
                        h2c->max_id = 0;
-                       h2c->st0 = H2_CS_SETTINGS1;
                        TRACE_STATE("switching to SETTINGS1", H2_EV_RX_PREFACE, h2c->conn);
+                       h2c->st0 = H2_CS_SETTINGS1;
                }
 
                if (h2c->st0 == H2_CS_SETTINGS1) {