Skip to content

Added TryComplete instead of comple during channel shutdown#1885

Merged
lukebakken merged 1 commit intorabbitmq:mainfrom
patriktiain:patrik/1884_fixShutdownThreadingChannel
Jan 12, 2026
Merged

Added TryComplete instead of comple during channel shutdown#1885
lukebakken merged 1 commit intorabbitmq:mainfrom
patriktiain:patrik/1884_fixShutdownThreadingChannel

Conversation

@patriktiain
Copy link

@patriktiain patriktiain commented Dec 9, 2025

Proposed Changes

Change from Threading.Channel.Complete() to TryComplete() to catch any race conditions. Race condition can occur if another thread already have called complete on this channel.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

@lukebakken lukebakken self-assigned this Dec 11, 2025
@lukebakken lukebakken self-requested a review December 11, 2025 17:32
@lukebakken lukebakken added this to the 7.2.1 milestone Dec 11, 2025
@michaelklishin
Copy link
Contributor

@lukebakken any reasons to not accept this PR?

@lukebakken
Copy link
Collaborator

Nope, I just haven't had time to return to this.

@lukebakken lukebakken force-pushed the patrik/1884_fixShutdownThreadingChannel branch from 1e676e4 to 3bcd62e Compare January 12, 2026 18:51
@lukebakken lukebakken merged commit f178fcf into rabbitmq:main Jan 12, 2026
6 checks passed
This was referenced Feb 26, 2026
hwinther pushed a commit to hwinther/test that referenced this pull request Mar 7, 2026
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Updated
[RabbitMQ.Client](https://github.com/rabbitmq/rabbitmq-dotnet-client)
from 7.2.0 to 7.2.1.

<details>
<summary>Release notes</summary>

_Sourced from [RabbitMQ.Client's
releases](https://github.com/rabbitmq/rabbitmq-dotnet-client/releases)._

## 7.2.1

[GitHub
milestone](https://github.com/rabbitmq/rabbitmq-dotnet-client/milestone/77?closed=1)

## What's Changed
* Add 'contents: read' to workflow permissions to increase the OpenSSF
scorecard of the repo by @​pavlofilatov1 in
rabbitmq/rabbitmq-dotnet-client#1880
* Add workflow to check for GHA updates by @​lukebakken in
rabbitmq/rabbitmq-dotnet-client#1887
* Update GHA via `actions-up` by @​lukebakken in
rabbitmq/rabbitmq-dotnet-client#1886
* Added TryComplete instead of comple during channel shutdown by
@​patriktiain in
rabbitmq/rabbitmq-dotnet-client#1885
* Catch all exceptions in HeartbeatWriteTimerCallback and
HeartbeatReadTimerCallback to avoid crash by @​klettier in
rabbitmq/rabbitmq-dotnet-client#1876
* Use dependabot to update actions refs by @​lukebakken in
rabbitmq/rabbitmq-dotnet-client#1896
* Bump github/codeql-action from 3 to 4 by @​dependabot[bot] in
rabbitmq/rabbitmq-dotnet-client#1898
* Bump actions/checkout from 6.0.1 to 6.0.2 by @​dependabot[bot] in
rabbitmq/rabbitmq-dotnet-client#1897
* Bump actions/cache from 5.0.2 to 5.0.3 by @​dependabot[bot] in
rabbitmq/rabbitmq-dotnet-client#1899
* Fix unconditional semaphore release in BasicPublishAsync when Cancell…
by @​EvheniyHlushko in
rabbitmq/rabbitmq-dotnet-client#1901
* Connection recovery: remove recorded bindings of auto-delete entities
by @​michaelklishin in
rabbitmq/rabbitmq-dotnet-client#1906
* Pre-7.2.1 release preparation by @​lukebakken in
rabbitmq/rabbitmq-dotnet-client#1909

## New Contributors
* @​pavlofilatov1 made their first contribution in
rabbitmq/rabbitmq-dotnet-client#1880
* @​patriktiain made their first contribution in
rabbitmq/rabbitmq-dotnet-client#1885
* @​klettier made their first contribution in
rabbitmq/rabbitmq-dotnet-client#1876
* @​dependabot[bot] made their first contribution in
rabbitmq/rabbitmq-dotnet-client#1898
* @​EvheniyHlushko made their first contribution in
rabbitmq/rabbitmq-dotnet-client#1901

**Full Changelog**:
rabbitmq/rabbitmq-dotnet-client@v7.2.0...v7.2.1

Commits viewable in [compare
view](rabbitmq/rabbitmq-dotnet-client@v7.2.0...v7.2.1).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=RabbitMQ.Client&package-manager=nuget&previous-version=7.2.0&new-version=7.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
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.

3 participants