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",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "2.0.5",
"version": "2.1.1",
"repository": {
"url": "http://github.com/calzoneman/sync"
},

View file

@ -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();
});
}