Skip to content

fix(microservices): ensure all the amqp connections are closed properly #15032

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

Conversation

yatin166
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?

AMQP close connection method is asynchronous, in the current behaviour, connection were not properly closed for channel/server due to missing async/await.

Issue Number: N/A

What is the new behavior?

Added async/await when close() is called for channel/server in server-rmq so that all the connections are properly closed.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

coveralls commented Apr 28, 2025

Pull Request Test Coverage Report for Build 3571f57c-cf2a-42b6-8a56-aff228a29056

Details

  • 3 of 13 (23.08%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.923%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/microservices/server/server-rmq.ts 3 13 23.08%
Totals Coverage Status
Change from base Build a9af550b-1747-4782-856a-aec11af85238: 0.0%
Covered Lines: 7177
Relevant Lines: 8071

💛 - Coveralls

@kamilmysliwiec
Copy link
Member

image

@yatin166
Copy link
Contributor Author

Fixed lint issue, can you check?

@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit 3cc0d98 into nestjs:master Apr 29, 2025
5 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