Skip to content
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

fix: updated moleculer-timeout-middleware with streams #1313

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JS-AK
Copy link
Contributor

@JS-AK JS-AK commented Dec 15, 2024

Added clean and close this.pendingReqStreams when request from another microservice was timeouted before sent answer

📝 Description

Fixed memory leak when another microservice started stream with broker.call and then timeouted

Create 3 services, api-gw, test-1, test-2
api-gw handle request -> test-1
test-1 make stream and send it to test-2
test-2 await time to handle timeout at test-1

If microservice test-2 handle timeot this.pendingRequests was not released/deleted

💎 Type of change

  • Bug fix (non-breaking change which fixes an issue)

🏁 Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

Repo for reproduce this bug

https://github.com/JS-AK/moleculer-pr-1313-example

Copy link

pkg-pr-new bot commented Dec 15, 2024

Open in Stackblitz

npm i https://pkg.pr.new/moleculerjs/moleculer@1313

commit: dac6518

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.

1 participant