This commit is contained in:
calzoneman 2013-07-27 10:13:30 -04:00
parent b9e465b714
commit be7ebf49d1
2 changed files with 8 additions and 4 deletions

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery", "author": "Calvin Montgomery",
"name": "CyTube", "name": "CyTube",
"description": "Online media synchronizer and chat", "description": "Online media synchronizer and chat",
"version": "2.0.5", "version": "2.1.1",
"repository": { "repository": {
"url": "http://github.com/calzoneman/sync" "url": "http://github.com/calzoneman/sync"
}, },

View File

@ -5,7 +5,7 @@ var Logger = require("./logger");
var Channel = require("./channel"); var Channel = require("./channel");
var User = require("./user"); var User = require("./user");
const VERSION = "2.1.0"; const VERSION = "2.1.1";
function getIP(req) { function getIP(req) {
var raw = req.connection.remoteAddress; var raw = req.connection.remoteAddress;
@ -168,8 +168,10 @@ var Server = {
shutdown: function () { shutdown: function () {
Logger.syslog.log("Unloading channels"); Logger.syslog.log("Unloading channels");
for(var i in this.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(); this.channels[i].saveDump();
}
} }
Logger.syslog.log("Goodbye"); Logger.syslog.log("Goodbye");
process.exit(0); process.exit(0);
@ -185,5 +187,7 @@ if(!Config.DEBUG) {
Logger.errlog.log(err.stack); Logger.errlog.log(err.stack);
}); });
process.on("SIGINT", Server.shutdown); process.on("SIGINT", function () {
Server.shutdown();
});
} }