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: silence max listeners exceeded warning #62

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

achingbrain
Copy link
Collaborator

@achingbrain achingbrain commented Nov 11, 2023

If we have more than 10x streams open accross all yamux muxer instances node will log warnings about too many listeners being added to the shutdown controller signal.

This is fine, increase the max number of listeners.

Also, where we create an abort signal for the close call, clone the options object instead of adding our signal to it, it's pretty common for people to pass an options object to several calls, this way we don't accidentally add a signal to an onwards method invocation 😬 .

If we have more than 10x streams open accross all yamux muxer
instances node will log warnings about too many listeners being
added to the shutdown controller signal.

This is fine, increase the max number of listeners.
@achingbrain achingbrain requested a review from a team as a code owner November 11, 2023 17:40
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2023

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/encode.ts 100.00% <100.00%> (ø)
test/codec.spec.ts 100.00% <100.00%> (ø)
test/compliance.spec.ts 100.00% <100.00%> (ø)
test/decode.spec.ts 96.01% <100.00%> (-0.02%) ⬇️
test/muxer.spec.ts 100.00% <100.00%> (ø)
test/stream.spec.ts 100.00% <100.00%> (+0.90%) ⬆️
test/util.ts 100.00% <100.00%> (ø)
src/decode.ts 93.75% <88.88%> (-1.39%) ⬇️
src/stream.ts 98.01% <99.08%> (+2.52%) ⬆️
test/codec.util.ts 94.28% <66.66%> (ø)
... and 2 more

📢 Thoughts on this report? Let us know!

@wemeetagain wemeetagain merged commit cce9446 into master Nov 12, 2023
17 checks passed
@wemeetagain wemeetagain deleted the fix/silence-max-listeners-exceeded-warning branch November 12, 2023 06:03
github-actions bot pushed a commit that referenced this pull request Nov 12, 2023
## [5.0.1](v5.0.0...v5.0.1) (2023-11-12)

### Bug Fixes

* do not stringify headers for logging ([#61](#61)) ([59e73d8](59e73d8))
* silence max listeners exceeded warning ([#62](#62)) ([cce9446](cce9446))
Copy link

🎉 This PR is included in version 5.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants