BUG/MINOR: stream: Don't update counters when TCP to H2 upgrades are performed
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 21 Jan 2021 16:10:44 +0000 (17:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Jan 2021 08:06:34 +0000 (09:06 +0100)
commit341064eb16e4cee2d39fa56325bb92f8609b82c2
tree668187259244759621f022e8f62181bc866ecf5a
parent37286a5ac595069a491c3e8a7a7e4faf3d9ea8ad
BUG/MINOR: stream: Don't update counters when TCP to H2 upgrades are performed

When a TCP to H2 upgrade is performed, the SF_IGNORE flag is set on the
stream before killing it. This happens when a TCP/SSL client connection is
routed to a HTTP backend and the h2 alpn detected. The SF_IGNORE flag was
added for this purpose, to skip some processing when the stream is aborted
before a mux upgrade. Some counters updates were skipped this way. But some
others are still updated.

Now, all counters update at the end of process_stream(), before releasing
the stream, are ignored if SF_IGNORE flag is set. Note this stream is
aborted because we switch from a mono-stream to a multi-stream
multiplexer. It works differently for TCP to H1 upgrades.

This patch should be backported as far as 2.0 after some observation period.
src/stream.c