Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
events: Output the event that is leaking
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
3rd-Eden authored and indutny committed Jul 1, 2014
1 parent b517500 commit 1c0ec71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/events.js
Expand Up @@ -173,9 +173,9 @@ EventEmitter.prototype.addListener = function addListener(type, listener) {
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'leak detected. %d %s listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
this._events[type].length, type);
console.trace();
}
}
Expand Down

1 comment on commit 1c0ec71

@juliangruber
Copy link
Member

Choose a reason for hiding this comment

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

awesome!

Please sign in to comment.