From b943948d24f0335bb3be9d7c2d7b515a7de84634 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 9 Oct 2015 19:27:49 +0100 Subject: [PATCH] Set a higher maxListeners value fixes #5373 - Set Max Listeners on our Event Emitter to 100 - Stops the '11 listeners added' error on node 0.12 during tests --- core/server/events/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/server/events/index.js b/core/server/events/index.js index 5dd065ab44..657f979346 100644 --- a/core/server/events/index.js +++ b/core/server/events/index.js @@ -1,9 +1,12 @@ var events = require('events'), util = require('util'), - EventRegistry; + EventRegistry, + EventRegistryInstance; EventRegistry = function () {}; - util.inherits(EventRegistry, events.EventEmitter); -module.exports = new EventRegistry(); +EventRegistryInstance = new EventRegistry(); +EventRegistryInstance.setMaxListeners(100); + +module.exports = EventRegistryInstance;