Skip to content

Commit

Permalink
Remove debug guard
Browse files Browse the repository at this point in the history
  • Loading branch information
rzikm committed May 15, 2024
1 parent 3e440e5 commit dbfa163
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,9 @@ 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;

if (_connection.AbortException is HttpProtocolException)
{
httpRequestError = HttpRequestError.HttpProtocolError;
}

// TODO: there are still some races?
Debug.Assert(httpRequestError != HttpRequestError.Unknown);
HttpRequestError httpRequestError = _connection.AbortException is HttpProtocolException
? HttpRequestError.HttpProtocolError
: HttpRequestError.Unknown;

throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
}
Expand Down Expand Up @@ -327,6 +321,7 @@ await Task.WhenAny(sendRequestTask, readResponseTask).ConfigureAwait(false) == s
{
throw;
}

// all exceptions should be already handled above
Debug.Fail($"Unexpected exception type in Http3RequestStream.SendAsync: {ex}");
throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
Expand Down

0 comments on commit dbfa163

Please sign in to comment.