From 777d767466494be79843d2cf87ee602bd3d7a147 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Thu, 16 May 2013 22:37:33 -0400 Subject: [PATCH] Fix incremental dumping of channels --- channel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/channel.js b/channel.js index ef2c07ea..facbeaff 100644 --- a/channel.js +++ b/channel.js @@ -158,7 +158,7 @@ Channel.prototype.loadDump = function() { this.css = data.css || ""; this.js = data.js || ""; this.sendAll("channelCSSJS", {css: this.css, js: this.js}); - setTimeout(function() { incrementalDump(this); }, 300000); + setTimeout(function() { incrementalDump(this); }.bind(this), 300000); } catch(e) { Logger.errlog.log("Channel dump load failed: "); @@ -193,6 +193,7 @@ Channel.prototype.saveDump = function() { // Save channel dumps every 5 minutes, in case of crash function incrementalDump(chan) { if(chan && chan.users && chan.users.length > 0) { + console.log("dumping " + chan.name); chan.saveDump(); setTimeout(function() { incrementalDump(chan); }, 300000); }