Calls to PipeReaderStream.ReadByte are implemented by calling ReadInternal. This is implemented with Task<T>.Resuslt, which wraps any exceptions in AggregateException. I believe most callers are expecting this to behave as though Task<T>.GetAwaiter().GetResult() was used.
|
ReadResult result = vt.IsCompletedSuccessfully ? vt.Result : vt.AsTask().Result; |
Originally found by looking at exception stacks in AB#1530459.
Calls to
PipeReaderStream.ReadByteare implemented by callingReadInternal. This is implemented withTask<T>.Resuslt, which wraps any exceptions inAggregateException. I believe most callers are expecting this to behave as thoughTask<T>.GetAwaiter().GetResult()was used.runtime/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReaderStream.cs
Line 67 in 1d6f23a
Originally found by looking at exception stacks in AB#1530459.