]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h2: support orphaned streams
authorWilly Tarreau <w@1wt.eu>
Fri, 10 Nov 2017 10:42:33 +0000 (11:42 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Nov 2017 10:48:15 +0000 (11:48 +0100)
commit22cf59bbbac90573cc28bf1035a3dae046083236
tree93a173e0a123cdb3a46b8612cee2b1054ad541d6
parentaa39860aeffbe4a6fe621bbdc5bfd1b12e16468b
BUG/MEDIUM: h2: support orphaned streams

When a stream_interface performs a shutw() then a shutr(), the stream
is marked closed. Then cs_destroy() calls h2_detach() and it cannot
fail since we're on the leaving path of the caller. The problem is that
in order to close streams we usually have to send either an emty DATA
frame with the ES flag set or an RST_STREAM frame, and the mux buffer
might already be full, forcing the stream to be queued. The forced
removal of this stream causes this last message to silently disappear,
and the client to wait forever for a response.

This commit ensures we can detach the conn_stream from the h2 stream
if the stream is blocked, effectively making the h2 stream an orphan,
ensures that the mux can deal with orphaned streams after processing
them, and that the demux can kill them upon receipt of GOAWAY.
src/mux_h2.c