Skip to content

Commit

Permalink
Make sure we only do garbage collection when the server we receive
Browse files Browse the repository at this point in the history
is actually ran.
  • Loading branch information
3rd-Eden committed Aug 4, 2011
1 parent d86ffcf commit 894ec9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ function Manager (server, options) {
clearInterval(self.gc);
});

// run our private gc every 10 seconds
this.gc = setInterval(this.garbageCollection.bind(this), 10000);
server.once('listening', function () {
self.gc = setInterval(self.garbageCollection.bind(self), 10000);
});

for (var i in transports) {
if (transports[i].init) {
Expand Down

0 comments on commit 894ec9f

Please sign in to comment.