fix(tui): increase event listener limits and clean up HMR leaks#35931
Open
prmartinow wants to merge 1 commit into
Open
fix(tui): increase event listener limits and clean up HMR leaks#35931prmartinow wants to merge 1 commit into
prmartinow wants to merge 1 commit into
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #34616: fix(tui): cleanup event listeners on component unmount to prevent MaxListenersExceededWarning Why it's related:
Recommendation: Check if PR #34616 is already merged or if there's overlap in the solution approach. The two PRs might be addressing different aspects of the same problem or could be duplicate efforts. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
409c024 to
b56c894
Compare
b56c894 to
f1b0aaf
Compare
bd8ab12 to
6e5a561
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #34617
Type of change
What does this PR do?
Frequent HMR remounts or session switching in the TUI registers listeners on the global emitter without unsubscribing, leading to
MaxListenersExceededWarningevents and memory leaks on the event bus.This PR configures explicit event listener limits on the global bus class, ensuring we don't trigger warning thresholds during active long-running sessions.
Note: This PR is complementary to #34616. While #34616 cleans up listeners on component unmount, this PR ensures that HMR remounts and server-side events do not trigger Node's default warning threshold on the event bus.
How did you verify your code works?
MaxListenersExceededWarningmessages are emitted in the console or logs.Screenshots / recordings
N/A
Checklist