File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed
src/Servers/Kestrel/Core/src/Internal/Http Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ public override async ValueTask<ReadResult> ReadAsync(CancellationToken cancella
57
57
}
58
58
catch ( ConnectionAbortedException ex )
59
59
{
60
- Log . RequestBodyDrainTimedOut ( _context . ConnectionIdFeature , _context . TraceIdentifier ) ;
61
60
throw new TaskCanceledException ( "The request was aborted" , ex ) ;
62
61
}
63
62
Original file line number Diff line number Diff line change @@ -55,10 +55,6 @@ protected override Task OnConsumeAsync()
55
55
_context . SetBadRequestState ( ex ) ;
56
56
return Task . CompletedTask ;
57
57
}
58
- catch ( ConnectionAbortedException )
59
- {
60
- Log . RequestBodyDrainTimedOut ( _context . ConnectionIdFeature , _context . TraceIdentifier ) ;
61
- }
62
58
catch ( InvalidOperationException ex )
63
59
{
64
60
var connectionAbortedException = new ConnectionAbortedException ( CoreStrings . ConnectionAbortedByApplication , ex ) ;
@@ -91,7 +87,7 @@ protected async Task OnConsumeAsyncAwaited()
91
87
{
92
88
_context . SetBadRequestState ( ex ) ;
93
89
}
94
- catch ( ConnectionAbortedException )
90
+ catch ( OperationCanceledException ex ) when ( ex is ConnectionAbortedException || ex is TaskCanceledException )
95
91
{
96
92
Log . RequestBodyDrainTimedOut ( _context . ConnectionIdFeature , _context . TraceIdentifier ) ;
97
93
}
You can’t perform that action at this time.
0 commit comments