BUG/MEDIUM: mux-h2: do not quit the demux loop before setting END_REACHED
authorWilly Tarreau <w@1wt.eu>
Fri, 5 Feb 2021 11:16:01 +0000 (12:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Feb 2021 11:22:54 +0000 (12:22 +0100)
commit133aaa9f110f5b78e57a23f9db0553e2978eca0e
treed77ab318c4fc015ed5992939ac20a7d43d3cc83e
parent25dd0ad1239627aa87d9ce25d268546037a97197
BUG/MEDIUM: mux-h2: do not quit the demux loop before setting END_REACHED

The demux loop could quit on missing data but the H2_CF_END_REACHED flag
would not be set in this case. This fixes a remaining situation where
previous commit f09612289 ("BUG/MEDIUM: mux-h2: handle remaining read0
cases") could not be sufficient and still leave CLOSE_WAIT. It's harder
to reproduce but was still observed in prod.

Now we quit via the end of the loop which already takes care of shutr.

This should be backported along with the patch above as far as 2.0.
src/mux_h2.c