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: increase limit on event listeners warning #255

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

lirantal
Copy link
Owner

@lirantal lirantal commented Jul 29, 2023

Summary

Fixes #249

Proposed Changes

The toolbar widget (toolbar.on()) registers 11 event listeneres which triggers a Node.js memory leak warning:

erik@WS-91019:~$ dockly
(node:15356) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 key listeners added to [myWidget]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)

There is no actual memory leak however, as it registers exactly 11 key presses for the toolbar.
This PR increases the limit to prevent the internal Node.js warning.

Checklist

@lirantal lirantal added the bug label Jul 29, 2023
@lirantal lirantal self-assigned this Jul 29, 2023
@lirantal lirantal merged commit f112051 into main Jul 29, 2023
10 checks passed
@github-actions
Copy link

🎉 This PR is included in version 3.23.4 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When exiting dockly, MaxListenersExceededWarning is displayed
1 participant