Skip to content

fix(microservices): fix double callback when isdisposed or err is truthy#16506

Merged
kamilmysliwiec merged 1 commit intonestjs:masterfrom
LhonRafaat:fix/double-callback-invocation-clientrmq
Mar 4, 2026
Merged

fix(microservices): fix double callback when isdisposed or err is truthy#16506
kamilmysliwiec merged 1 commit intonestjs:masterfrom
LhonRafaat:fix/double-callback-invocation-clientrmq

Conversation

@LhonRafaat
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

when isDisposed or err is truthy, the callback is invoked twice. Can cause duplicate message processing.
Screenshot from 2026-03-04 20-59-47

Issue Number: N/A

What is the new behavior?

If isDisposed or err is truthy, returns the callback, so the callback below it does not get executed.

Screenshot from 2026-03-04 21-00-25

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1a5d0d28-24a9-47a0-8ba1-e37b329f5833

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.863%

Totals Coverage Status
Change from base Build e9fca389-3e6c-422f-afba-e2baae073f48: 0.0%
Covered Lines: 7473
Relevant Lines: 8316

💛 - Coveralls

@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit 8366143 into nestjs:master Mar 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants