]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-h2: make the do_shut{r,w} functions more robust against retries
authorWilly Tarreau <w@1wt.eu>
Tue, 14 May 2019 08:40:21 +0000 (10:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 14 May 2019 09:13:06 +0000 (11:13 +0200)
commitf983d00a1ce89d9505daf1ffde5db1bf58aab1fc
tree46492308aaa9cc3c359cd7784ccba4bd3d03aa45
parent90a10aeb65d115c268ff9aa0f5ad39a29a1a35b3
BUG/MINOR: mux-h2: make the do_shut{r,w} functions more robust against retries

These functions may fail to emit an RST or an empty DATA frame because
the mux is full or busy. Then they subscribe the h2s and try again.
However when doing so, they will already have marked the error state on
the stream and will not pass anymore through the sequence resulting in
the failed frame to be attempted to be sent again nor to the close to
be done, instead they will return a success.

It is important to only leave when the stream is already closed, but
to go through the whole sequence otherwise.

This patch should ideally be backported to 1.9 though it's possible that
the lack of the WANT_SHUT* flags makes this difficult or dangerous. The
severity is low enough to avoid this in case of trouble.
src/mux_h2.c