MINOR: mux-quic: ensure CONNECTION_CLOSE is scheduled once per conn
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 9 Mar 2023 09:14:28 +0000 (10:14 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Mar 2023 13:39:49 +0000 (14:39 +0100)
commite2213df9fe5a84288a952bd685a0cafc3d1f6b3c
tree2e02faa5a3749e6169d335f6cfb260ac519bd70b
parentb47310d883700eee4ba996a7f035b05a069723cd
MINOR: mux-quic: ensure CONNECTION_CLOSE is scheduled once per conn

Add BUG_ON() statements to ensure qcc_emit_cc()/qcc_emit_cc_app() is not
called more than one time for each connection. This should improve code
resilience of MUX-QUIC and H3 and it will ensure that a scheduled
CONNECTION_CLOSE is not overwritten by another one with a different
error code.

This commit relies on the previous one to ensure all QUIC operations are
not conducted as soon as a CONNECTION_CLOSE has been prepared :
  commit d7fbf458f8a4c5b09cbf0da0208fbad70caaca33
  MINOR: mux-quic: interrupt most operations if CONNECTION_CLOSE scheduled

This should be backported up to 2.7.
src/mux_quic.c