Skip to content
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

Cancellation request may be ignored if it comes just right after the request it cancels #56

Closed
IlyaBiryukov opened this issue Aug 31, 2017 · 0 comments
Assignees
Labels

Comments

@IlyaBiryukov
Copy link
Contributor

Repro:

  1. Invoke a request with cancellation
  2. Immediately cancel it

Actual:
Intermittently, the cancellation token is ignored and the cancellation is never passed to the server

Expected:
The server method is cancelled

Root Cause:
ReadAndHandleRequestsAsync() kicks off each request on its own thread, and the cancellation request, though arrived second, may be handled faster than the method invocation, and may not find its id in inboundCancellationSources, and won't be able to cancel it.

@IlyaBiryukov IlyaBiryukov self-assigned this Aug 31, 2017
IlyaBiryukov pushed a commit that referenced this issue Sep 1, 2017
To ensure that cancellation request is processed after the method it is
cancelling, we handle all incoming requests sequentilly, and only yield
when we execute user code.

Fix for #56
IlyaBiryukov pushed a commit that referenced this issue Sep 7, 2017
To ensure that cancellation request is processed after the method it is
cancelling, we handle all incoming requests sequentilly, and only yield
when we execute user code.

Fix for #56
AArnott pushed a commit that referenced this issue Sep 8, 2017
To ensure that cancellation request is processed after the method it is
cancelling, we handle all incoming requests sequentilly, and only yield
when we execute user code.

Fix for #56
AArnott pushed a commit that referenced this issue Sep 8, 2017
To ensure that cancellation request is processed after the method it is
cancelling, we handle all incoming requests sequentilly, and only yield
when we execute user code.

Fix for #56
AArnott added a commit that referenced this issue Apr 12, 2022
Update package references and SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant