Capture Edi at Abort not throw (#11875)
This commit is contained in:
parent
e6a4d9f19e
commit
5a0a7aa088
|
|
@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
{
|
||||
private MessageBody _body;
|
||||
private HttpStreamState _state;
|
||||
private Exception _error;
|
||||
private ExceptionDispatchInfo _error;
|
||||
|
||||
public HttpRequestPipeReader()
|
||||
{
|
||||
|
|
@ -92,7 +92,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
if (_state != HttpStreamState.Closed)
|
||||
{
|
||||
_state = HttpStreamState.Aborted;
|
||||
_error = error;
|
||||
if (error != null)
|
||||
{
|
||||
_error = ExceptionDispatchInfo.Capture(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -112,7 +115,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
{
|
||||
if (_error != null)
|
||||
{
|
||||
ExceptionDispatchInfo.Capture(_error).Throw();
|
||||
_error.Throw();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue