Skip to content

Report user canceled cancellation token #2018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 18, 2023

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jan 16, 2023

Fixes #2014

We want to report the user specified cancellation token via OperationCanceledException.CancellationToken if it is the cause of cancellation. Today, an internal cancellation token is typically provided.

Verified

This commit was signed with the committer’s verified signature.
ljharb Jordan Harband

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
JamesNK and others added 3 commits January 18, 2023 06:34
@JamesNK
Copy link
Member Author

JamesNK commented Jan 17, 2023

I remember why I used a delay. Canceling in the call doesn't work well with streaming calls. I moved the cancellation in that case to serializing the message.

@JamesNK JamesNK merged commit 0a26b0c into grpc:master Jan 18, 2023
@JamesNK JamesNK deleted the jamesnk/cancellationtoken-standardcall branch January 18, 2023 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OperationCanceledException thrown when canceling a CancelationToken does not reference the token canceled
2 participants