`setMaxListeners(Infinity)` call should probably be removed
Closed this issue · 1 comments
huntharo commented
Describe the bug
The setMaxListeners(Infinity)
call seems like a hidden bad idea. Letting EventEmitter print the warning when it goes over 10 listeners may help some consumers find that they were leaking listeners. It seems that this should just be removed and left to the consumer to raise / disable if they choose.
if (this.setMaxListeners) {
this.setMaxListeners(Infinity);
}
Lines 22 to 24 in c60ea82
To Reproduce
n/a
Expected behavior
Consumer should disable the event emitter listener limit if they choose to do so.
Additional context
Thoughts?
fed135 commented
That's a fair point, I will remove it.