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(listeners): avoid "too many listeners" problem safely #4223

Merged
merged 1 commit into from
Oct 23, 2020

Conversation

pavelfeldman
Copy link
Member

@pavelfeldman pavelfeldman commented Oct 23, 2020

Fixes #4224

@@ -58,6 +58,10 @@ export async function gracefullyCloseAll() {
await Promise.all(Array.from(gracefullyCloseSet).map(gracefullyClose => gracefullyClose().catch(e => {})));
}

// We currently spawn a process per page when recording video in Chromium.
// This triggers "too many listeners" on the process object once you have more than 10 pages open.
process.setMaxListeners(100);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
process.setMaxListeners(100);
process.setMaxListeners(0);

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.

[BUG] Don't disable nodes maxListeners warning on
2 participants