Fix StreamReader to pass cancellation token into ReadBufferAsync (dotnet/coreclr...
authorStephen Toub <stoub@microsoft.com>
Sun, 27 Oct 2019 20:48:18 +0000 (16:48 -0400)
committerGitHub <noreply@github.com>
Sun, 27 Oct 2019 20:48:18 +0000 (16:48 -0400)
commitf3a9f95653b52841da84cfa696e14621dac2cac6
treea836a05d526e05badc98359671fa2c6d0b810360
parent3f32876373af4384ddf16b7196008fc9ff834373
Fix StreamReader to pass cancellation token into ReadBufferAsync (dotnet/coreclr#27464)

ReadAsyncInternal is correctly passing its token into the two call sites where it delegates directly to the underlying stream, but in one place it calls through ReadBufferAsync, which is currently not defined to take a token.  Fix that, and pass the token through.

Commit migrated from https://github.com/dotnet/coreclr/commit/5d0be1504e1dd5e2b8064b6a87cdf1023c7d4afa
src/libraries/System.Private.CoreLib/src/System/IO/StreamReader.cs