mirror of https://github.com/calzoneman/sync.git
Fix #228
This commit is contained in:
parent
b9e465b714
commit
be7ebf49d1
|
@ -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"
|
||||||
},
|
},
|
||||||
|
|
10
server.js
10
server.js
|
@ -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();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue