Skip to content

Commit

Permalink
fix for EventEmitters always reusing the same Array instance for list…
Browse files Browse the repository at this point in the history
…eners

This fixes node v0.7.x.

The node commits that broke this old behavior is here:
  nodejs/node-v0.x-archive@78dc13fbf97e2e3003e6f3baacdd5ff60e8de3f7^...928ea56
  • Loading branch information
TooTallNate committed Apr 19, 2012
1 parent 0242a2d commit e188485
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e188485

Please sign in to comment.