You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTP3: Http3Stream is not removed from _activeRequests table until response Stream Dispose is called #58072
I found this by investigating other test issues...
The only place we call RemoveStream is when the user calls Dispose on the response Stream. That means that if they never call Dispose, we will be waiting potentially forever for GC to kick in and finalize the stream, and this will delay closing the connection.
We should instead remove the stream as soon as it is complete, i.e. request and response both fully sent/received or aborted. This is how HTTP/1.1 and HTTP2 work (I think).
Note this only matters when using HttpCompletionOption.ResponseHeadersRead.
You can reproduce this by cancelling the read on an incomplete response and then trying to shut down the server without disposing the response. See for example the GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCanceledQuickly test.
Triage: Useful as it addresses common user problem of not disposing response Stream. Limited to HttpCompletionOption.ResponseHeadersRead.
Not critical for 6.0.
Activity
karelz commentedon Aug 26, 2021
Triage: Useful as it addresses common user problem of not disposing response Stream. Limited to
HttpCompletionOption.ResponseHeadersRead.Not critical for 6.0.