Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ await Task.WhenAny(sendRequestTask, readResponseTask).ConfigureAwait(false) == s
Exception abortException = _connection.Abort(HttpProtocolException.CreateHttp3ConnectionException(code, SR.net_http_http3_connection_close));
throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_client_execution_error, abortException);
}
catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted && cancellationToken.IsCancellationRequested)
{
// It is possible for QuicStream's code to throw an
// OperationAborted QuicException when cancellation is requested.
throw new TaskCanceledException(ex.Message, ex, cancellationToken);
}
catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted && _connection.AbortException != null)
{
// we closed the connection already, propagate the AbortException
Expand Down Expand Up @@ -1277,6 +1283,11 @@ private void HandleReadResponseContentException(Exception ex, CancellationToken
: HttpRequestError.Unknown;
throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);

case QuicException e when (e.QuicError == QuicError.OperationAborted && cancellationToken.IsCancellationRequested):
// It is possible for QuicStream's code to throw an
// OperationAborted QuicException when cancellation is requested.
throw new TaskCanceledException(e.Message, e, cancellationToken);

case HttpIOException:
_connection.Abort(ex);
ExceptionDispatchInfo.Throw(ex); // Rethrow.
Expand Down