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:
Nick Craver 2015-11-10 22:58:19 -05:00
parent 55f6f21d5a
commit d1221e82c1
3 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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)

View File

@ -94,7 +94,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
{
tcs2.SetResult(task2.Result);
}
}, tcs);
}, tcs, cancellationToken);
return tcs.Task;
}