-
Notifications
You must be signed in to change notification settings - Fork 592
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
Cancelling ModelSendAsync
can close the connection when it shouldn't
#1750
Comments
I think passing already cancelled cancellation token will trigger exception already on the await _rpcSemaphore.WaitAsync(k.CancellationToken). The problem occurs when it's passed to the Connection. Any exception thrown from the HandleCommandAsync method of AsyncRpcContinuation is causing closing the Connection. |
lukebakken
added a commit
that referenced
this issue
Dec 26, 2024
Fixes #1750 * Start by adding a test that reproduces the error. Give a 5ms cancellation to `BasicConsumeAsync`, with a much longer delay via Toxiproxy. If running in debug mode, you will see the same `task canceled` exception, but it does not propagate to the test itself.
lukebakken
added a commit
to rabbitmq/rabbitmq-server
that referenced
this issue
Dec 27, 2024
lukebakken
added a commit
that referenced
this issue
Dec 27, 2024
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
@ZajacPiotr98 if you have time to test #1753, I would appreciate it. Thanks! |
lukebakken
added a commit
to rabbitmq/rabbitmq-server
that referenced
this issue
Jan 3, 2025
lukebakken
added a commit
that referenced
this issue
Jan 3, 2025
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
lukebakken
added a commit
that referenced
this issue
Jan 10, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Reported here: #1720 (comment)
Reproduction steps
BasicConsumeAsync
that will close in the future.Expected behavior
Connection should not close in this case.
Additional context
#1720 (comment)
The text was updated successfully, but these errors were encountered: