diff --git a/lib/manager.js b/lib/manager.js index 612166283b..b8a428768c 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -109,8 +109,7 @@ function Manager (server, options) { }); // reset listeners - this.oldListeners = server.listeners('request'); - server.removeAllListeners('request'); + this.oldListeners = server.listeners('request').splice(0); server.on('request', function (req, res) { self.handleRequest(req, res);