From be7ebf49d1775340126ec72a3fc3bea28486b077 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 27 Jul 2013 10:13:30 -0400 Subject: [PATCH] Fix #228 --- package.json | 2 +- server.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 95ac9023..bda636e6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "2.0.5", + "version": "2.1.1", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/server.js b/server.js index 3fcddb88..98e24d03 100644 --- a/server.js +++ b/server.js @@ -5,7 +5,7 @@ var Logger = require("./logger"); var Channel = require("./channel"); var User = require("./user"); -const VERSION = "2.1.0"; +const VERSION = "2.1.1"; function getIP(req) { var raw = req.connection.remoteAddress; @@ -168,8 +168,10 @@ var Server = { shutdown: function () { Logger.syslog.log("Unloading channels"); for(var i in this.channels) { - if(this.channels[i].registered) + if(this.channels[i].registered) { + Logger.syslog.log("Saving /r/" + this.channels[i].name); this.channels[i].saveDump(); + } } Logger.syslog.log("Goodbye"); process.exit(0); @@ -185,5 +187,7 @@ if(!Config.DEBUG) { Logger.errlog.log(err.stack); }); - process.on("SIGINT", Server.shutdown); + process.on("SIGINT", function () { + Server.shutdown(); + }); }