Uh oh!
There was an error while loading. Please reload this page.
[QUIC] Cosmetic changes to Read pipeline - #55591
Conversation
ghost
commented
Jul 13, 2021
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFollow-up for NITs and cosmetic changes from #55505
|
ghost
commented
Jul 13, 2021
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFollow-up for NITs and cosmetic changes from #55505
|
| abortError = _state.ReadErrorCode; | ||
| if (readState != ReadState.PendingRead && cancellationToken.IsCancellationRequested) | ||
| // Failure scenario: pre-canceled token. Transition: any -> Aborted |
| initialReadState = ReadState.Aborted; | ||
| _state.ReadState = ReadState.Aborted; | ||
| canceledSynchronously = true; | ||
| preCanceled = true; |
There was a problem hiding this comment.
Why don't directly return new OperationCanceledException(cancellationToken) here and get rid of preCanceled local var. We wouldn't even need to change the initialReadState if I'm reading the code correctly.
There was a problem hiding this comment.
To do all the work on exceptions in one place and outside of the lock
Follow-up for NITs and cosmetic changes from #55505