File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/Servers/HttpSys/src/RequestProcessing Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,12 @@ public override void Flush()
127
127
var flags = ComputeLeftToWrite ( data . Count , endOfRequest ) ;
128
128
if ( endOfRequest && _leftToWrite > 0 )
129
129
{
130
+ if ( ! RequestContext . DisconnectToken . IsCancellationRequested )
131
+ {
132
+ // This is logged rather than thrown because it is too late for an exception to be visible in user code.
133
+ LogHelper . LogError ( Logger , "ResponseStream::Dispose" , "Fewer bytes were written than were specified in the Content-Length." ) ;
134
+ }
130
135
_requestContext . Abort ( ) ;
131
- // This is logged rather than thrown because it is too late for an exception to be visible in user code.
132
- LogHelper . LogError ( Logger , "ResponseStream::Dispose" , "Fewer bytes were written than were specified in the Content-Length." ) ;
133
136
return ;
134
137
}
135
138
@@ -690,8 +693,8 @@ protected override unsafe void Dispose(bool disposing)
690
693
{
691
694
return ;
692
695
}
693
- _disposed = true ;
694
696
FlushInternal ( endOfRequest : true ) ;
697
+ _disposed = true ;
695
698
}
696
699
}
697
700
finally
You can’t perform that action at this time.
0 commit comments