trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

Fix HTTP/2 canceled stream cleanup timing

Open bneradt opened this issue 1 month ago • 0 comments

When streams are canceled via RST_STREAM, the stream deletion now happens immediately before the next frame is processed. This prevents the race condition where new HEADERS frames are incorrectly refused because the stream count hasn't been decremented yet. Additionally, when streams are refused due to exceeding max_concurrent_streams, the header blocks are now properly decoded to maintain HPACK dynamic table synchronization per RFC 9113, and RST_STREAM with REFUSED_STREAM is sent instead of terminating the connection with COMPRESSION_ERROR.

Fixes: #9179


I have run this on a machine taking production traffic and it ran fine.

bneradt avatar Nov 19 '25 02:11 bneradt