Skip to content

Commit

Permalink
Correct fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotalik committed Feb 22, 2019
1 parent 283396a commit c1799e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public override async ValueTask<ReadResult> ReadAsync(CancellationToken cancella
}
catch (ConnectionAbortedException ex)
{
Log.RequestBodyDrainTimedOut(_context.ConnectionIdFeature, _context.TraceIdentifier);
throw new TaskCanceledException("The request was aborted", ex);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ protected override Task OnConsumeAsync()
_context.SetBadRequestState(ex);
return Task.CompletedTask;
}
catch (ConnectionAbortedException)
{
Log.RequestBodyDrainTimedOut(_context.ConnectionIdFeature, _context.TraceIdentifier);
}
catch (InvalidOperationException ex)
{
var connectionAbortedException = new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication, ex);
Expand Down Expand Up @@ -91,7 +87,7 @@ protected async Task OnConsumeAsyncAwaited()
{
_context.SetBadRequestState(ex);
}
catch (ConnectionAbortedException)
catch (OperationCanceledException ex) when (ex is ConnectionAbortedException || ex is TaskCanceledException)
{
Log.RequestBodyDrainTimedOut(_context.ConnectionIdFeature, _context.TraceIdentifier);
}
Expand Down

0 comments on commit c1799e1

Please sign in to comment.