Skip to content

Commit

Permalink
Run initStore on store setting change. Fixes socketio#367.
Browse files Browse the repository at this point in the history
  • Loading branch information
dshaw committed Jul 11, 2011
1 parent 9bf10ed commit 59e250b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,18 @@ function Manager (server) {
, 'client store expiration': 15
};

var self = this;

this.initStore();

this.on('set:store', function() {
self.initStore();
});

// reset listeners
this.oldListeners = server.listeners('request');
server.removeAllListeners('request');

var self = this;

server.on('request', function (req, res) {
self.handleRequest(req, res);
});
Expand Down

0 comments on commit 59e250b

Please sign in to comment.