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

Handle OperationCanceledException in RPC continuations #1753

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

lukebakken
Copy link
Contributor

Fixes #1750

@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1750 branch from a3e2a69 to a3618c6 Compare December 27, 2024 19:37
@lukebakken lukebakken self-assigned this Dec 27, 2024
@lukebakken lukebakken added this to the 7.1.0 milestone Dec 27, 2024
@lukebakken lukebakken marked this pull request as ready for review January 3, 2025 14:01
@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1750 branch from 42c5baa to f8d2955 Compare January 3, 2025 20:39
@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1750 branch 3 times, most recently from 42aa2ae to 59fa75c Compare January 13, 2025 19:36
Fixes #1750

* Start by adding a test that demonstrates the error. Give a 5ms cancellation to `BasicConsumeAsync`, with a much longer delay via a hacked RabbitMQ. If running in debug mode, you will see the same `task canceled` exception, but it does not propagate to the test itself.
* Set cancellation correctly for TaskCompletionSource in AsyncRpcContinuation
* Handle continuation cancellation and timeouts correctly
* Refactor repeated code
* Add wait on `RegisteredAsync` to see how the changes in #1750 affect the order of operations.
* Check to ensure no connection shutdown in `TestBasicConsumeCancellation_GH1750`
* @danielmarbach noticed an improvement. Do not elide `await` here.
* Extend GHA timeout for Windows builds, yuck (see actions/runner-images#7320)
@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1750 branch from 59fa75c to cc16b10 Compare January 16, 2025 00:18
@lukebakken lukebakken merged commit bcba9e4 into main Jan 16, 2025
16 checks passed
@lukebakken lukebakken deleted the rabbitmq-dotnet-client-1750 branch January 16, 2025 17:28
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.

Cancelling ModelSendAsync can close the connection when it shouldn't
2 participants