Skip to content

Ensure broker-originated channel closure completes #1764

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 1 commit into from
Jan 9, 2025

Conversation

lukebakken
Copy link
Collaborator

Fixes #1749

  • Ensure Dispose and DisposeAsync are idempotent and thread-safe.
  • Use TaskCompletionSource when HandleChannelCloseAsync runs to allow dispose methods to wait.
  • Use Interlocked for thread safety.
  • I like _isDisposing better. So sue me!
  • Move the Interlocked.Exchange code to a getter, for readability.
  • Minor nullable change.

Fixes #1749

* Ensure `Dispose` and `DisposeAsync` are idempotent and thread-safe.
* Use TaskCompletionSource when `HandleChannelCloseAsync` runs to allow dispose methods to wait.
* Use `Interlocked` for thread safety.
* I like `_isDisposing` better. So sue me!
* Move the `Interlocked.Exchange` code to a getter, for readability.
* Minor nullable change.

Co-authored-by: Daniel Marbach <[email protected]>
@lukebakken lukebakken self-assigned this Jan 9, 2025
@lukebakken lukebakken added this to the 7.1.0 milestone Jan 9, 2025
@lukebakken lukebakken marked this pull request as ready for review January 9, 2025 20:35
@lukebakken lukebakken merged commit a464d61 into main Jan 9, 2025
7 checks passed
@lukebakken lukebakken deleted the rabbitmq-dotnet-client-1749-fix-co-author branch January 9, 2025 20:35
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.

ObjectDisposedException when channel is closed by RabbitMQ due to a channel exception
1 participant