Skip to content

fix(microservices): ensure all redis and amqp client closes properly #15062

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

Conversation

yatin166
Copy link
Contributor

@yatin166 yatin166 commented May 3, 2025

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?

Redis and AMQP close connection method is asynchronous, in the current behaviour, connection were not properly closed for pub/sub or channel/client for clients due to missing async/await.

Issue Number: N/A

What is the new behavior?

Added async/await when close() is called for pub/sub or channel/client in client-redis and client-rmq respectively, so that all the connections are properly closed.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

Pull Request Test Coverage Report for Build f0eb5fd0-aeb2-45c0-9868-b529fc3b37d8

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.923%

Totals Coverage Status
Change from base Build c99d332b-8204-48ec-bc18-15971298dd6e: 0.0%
Covered Lines: 7177
Relevant Lines: 8071

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit a9a4eb4 into nestjs:master May 5, 2025
5 checks passed
@kamilmysliwiec
Copy link
Member

LGTM

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