quiche
quiche copied to clipboard
Properly clean up peer-initiated uni streams when shutdown for reading
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