Pass cancellation tokens down consistently
I'm assuming these are oversights since the usage is inconsistent. Otherwise this served only as a mild waste of time :)
This commit is contained in:
parent
55f6f21d5a
commit
d1221e82c1
|
|
@ -75,7 +75,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Filter
|
|||
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken token)
|
||||
{
|
||||
var segment = new ArraySegment<byte>(buffer, offset, count);
|
||||
return _output.WriteAsync(segment);
|
||||
return _output.WriteAsync(segment, cancellationToken: token);
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
|||
public async Task FlushAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await ProduceStartAndFireOnStarting(immediate: false);
|
||||
await SocketOutput.WriteAsync(_emptyData, immediate: true);
|
||||
await SocketOutput.WriteAsync(_emptyData, immediate: true, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
public void Write(ArraySegment<byte> data)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
|||
{
|
||||
tcs2.SetResult(task2.Result);
|
||||
}
|
||||
}, tcs);
|
||||
}, tcs, cancellationToken);
|
||||
return tcs.Task;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue