use emitter.setMaxListeners().
This commit is contained in:
parent
1795cd93d6
commit
610e00ee21
|
@ -14,6 +14,10 @@ function EventEmitter() {
|
|||
if (!this._events) this._events = {};
|
||||
}
|
||||
|
||||
EventEmitter.prototype.setMaxListeners = function(n) {
|
||||
this._maxListeners = n;
|
||||
};
|
||||
|
||||
EventEmitter.prototype.addListener = function(type, listener) {
|
||||
if (!this._events[type]) {
|
||||
this._events[type] = listener;
|
||||
|
|
|
@ -354,7 +354,8 @@ function Screen(options) {
|
|||
|
||||
this.enter();
|
||||
|
||||
this._maxListeners = Infinity;
|
||||
// XXX Not used right now since we're using our own EventEmitter:
|
||||
this.setMaxListeners(Infinity);
|
||||
|
||||
Screen.total++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue