Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix StreamReader to pass cancellation token into ReadBufferAsync #27464

Merged
merged 1 commit into from
Oct 27, 2019

Conversation

stephentoub
Copy link
Member

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.

Contributes to https://github.com/dotnet/corefx/issues/42136
cc: @JeremyKuhne

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.
Copy link
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stephentoub stephentoub merged commit 5d0be15 into dotnet:master Oct 27, 2019
@stephentoub stephentoub deleted the streamreadercancellation branch October 27, 2019 20:48
stephentoub added a commit to stephentoub/coreclr that referenced this pull request Oct 28, 2019
…net#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.
danmoseley pushed a commit that referenced this pull request Oct 31, 2019
) (#27501)

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants