Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
rzikm committed Apr 18, 2024
1 parent 0eb8069 commit 3e440e5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,17 @@ await Task.WhenAny(sendRequestTask, readResponseTask).ConfigureAwait(false) == s
}
catch (QuicException ex) when (ex.QuicError == QuicError.OperationAborted && _connection.AbortException != null)
{
// we closed the connection already, propagate the AbortException
HttpRequestError httpRequestError = HttpRequestError.Unknown;

// TODO: there are still some races
if (_connection.AbortException is HttpProtocolException)
{
httpRequestError = HttpRequestError.HttpProtocolError;
}

// we close the connection, propagate the AbortException
// TODO: there are still some races?
Debug.Assert(httpRequestError != HttpRequestError.Unknown);

throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
}
// It is possible for user's Content code to throw an unexpected OperationCanceledException.
Expand Down

0 comments on commit 3e440e5

Please sign in to comment.