diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs index dd3cc2bc85f7a..ef2532b2b22d0 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs @@ -1270,6 +1270,13 @@ private void HandleReadResponseContentException(Exception ex, CancellationToken _connection.Abort(exception); throw exception; + case QuicException e when (e.QuicError == QuicError.OperationAborted && _connection.AbortException != null): + // we closed the connection already, propagate the AbortException + HttpRequestError httpRequestError = _connection.AbortException is HttpProtocolException + ? HttpRequestError.HttpProtocolError + : HttpRequestError.Unknown; + throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException); + case HttpIOException: _connection.Abort(ex); ExceptionDispatchInfo.Throw(ex); // Rethrow.