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

EventEmitter Memory leak fixed. #14

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

Conversation

brooksideas
Copy link

A comment from your student on Udemy.

Possible EventEmitter memory leak detected. over 26 data listeners are added therefore we can use the MaxListeners to increase the limit.
Possible EventEmitter memory leak detected. 27 data listeners are added therefore we can  adjust the defaultMaxListeners  to increase the limit.
Possible EventEmitter memory leak detected.  27 data listeners are added therefore we can adjust defaultMaxListeners to increase the limit.
MaxListenerExceededWarning fixed!
Possible EventEmitter memory leak detected. 21 data listeners are added therefore we can  adjust defaultMaxListeners to increase the limit.
Possible EventEmitter memory leak detected. 15 data listeners are added therefore we can use the emitter.setMaxListener() to increase the limit.
require('events').EventEmitter.defaultMaxListeners = 27;

///MaxListenerExceededWarning fixed!
require('events').EventEmitter.defaultMaxListeners = 27;
Copy link

Choose a reason for hiding this comment

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

Why is this defaultMaxListeners changed twice in this file?

@dawsbot
Copy link

dawsbot commented Jan 29, 2019

Seems like a worthwhile PR, I didn't like getting these console warnings during my time following the Udemy lessons

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.

None yet

2 participants