quiche icon indicating copy to clipboard operation
quiche copied to clipboard

Properly clean up peer-initiated uni streams when shutdown for reading

Open LPardue opened this issue 7 months ago • 0 comments

When a peer iniates a unidirectional stream and sends data, it is normally readable at the local endpoint. However, a local call to stream_shutdown() with Direction::Read removes it from the local readable map, causing attempts to use stream_recv() to exit early, preventing delivery of the data or a stream reset, and thus preventing stream collection. Thus leaving an inaccessible zombie stream in the internal stream map.

This change adds a check inside stream_shutdown() to ensure a completed stream is properly collected and its local state is tidied away.

Closes #1968

LPardue avatar May 12 '25 13:05 LPardue