When starting a QuicStream, we call MsQuicStreamStart
| internalValueTaskStartAsync(CancellationTokencancellationToken=default) |
| { |
| _startedTcs.TryInitialize(outValueTaskvalueTask,this,cancellationToken); |
| { |
| unsafe |
| { |
| intstatus=MsQuicApi.Api.StreamStart( |
| _handle, |
| QUIC_STREAM_START_FLAGS.SHUTDOWN_ON_FAIL|QUIC_STREAM_START_FLAGS.INDICATE_PEER_ACCEPT); |
| if(ThrowHelper.TryGetStreamExceptionForMsQuicStatus(status,outException?exception)) |
| { |
| _startedTcs.TrySetException(exception); |
| } |
| } |
| } |
| |
| returnvalueTask; |
| } |
TryGetStreamExceptionForMsQuicStatus attempts to classify the status code and behaves accordingly.
| internalstaticboolTryGetStreamExceptionForMsQuicStatus(intstatus,[NotNullWhen(true)]outException?exception) |
| { |
| if(status==QUIC_STATUS_ABORTED) |
| { |
| // If status == QUIC_STATUS_ABORTED, we will receive an event later, which will complete the task source. |
| exception=null; |
| returnfalse; |
| } |
However, MsQuicStreamStart can return QUIC_STATUS_ABORTED, and in this case we will not receive any event because the stream is not considered started.
This may be the cause of some of the "The operation has timed out" CI failures.
When starting a QuicStream, we call MsQuicStreamStart
runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs
Lines 238 to 255 in b432fc6
TryGetStreamExceptionForMsQuicStatusattempts to classify the status code and behaves accordingly.runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ThrowHelper.cs
Lines 30 to 37 in 2984b87
However,
MsQuicStreamStartcan returnQUIC_STATUS_ABORTED, and in this case we will not receive any event because the stream is not considered started.This may be the cause of some of the "The operation has timed out" CI failures.