Fix HTTP/3 loopback server WaitForCancellationAsync and aborting on finalization#60395
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFixed WaitForCancellationAsync to take into account both read and write cancellations. (Partially?) fixed not aborting on finalization. I have additional questions on disposing being part of Http3ReadStream and not Http3WriteStream, and also the fact that _connection.RemoveStream is called only in Http3RequestStream.Dispose and in Http3ReadStream -- if Http3ReadStream was never created and Http3RequestStream was left for finalization it seems that Http3RequestStream instance will live until it's connection is disposed/finalized? I decided it will be better to investigate as a separate PR. Fixes #58234
|
No: |
|
After thinking through the disposal behavior and Http3ReadStream vs Http3WriteStream -- it is sufficient to have disposal/abortion in Http3ReadStream.
With that, I believe this PR should fully fix #60141 |
Fixed WaitForCancellationAsync to take into account both read and write cancellations.
(Partially?)fixed not aborting on finalization.I have additional questions on disposing being part of Http3ReadStream and not Http3WriteStream, and also the fact that _connection.RemoveStream is called only in Http3RequestStream.Dispose and in Http3ReadStream -- if Http3ReadStream was never created and Http3RequestStream was left for finalization it seems that Http3RequestStream instance will live until it's connection is disposed/finalized? I decided it will be better to investigate as a separate PR.UPD: answered below
Fixes #58234
Contributes toFixes #60141