Fix errored channels getting stuck during unload

This commit is contained in:
Calvin Montgomery 2018-01-06 09:59:18 -08:00
parent 7b328b10c3
commit 78bffad888
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -284,6 +284,8 @@ Server.prototype.getChannel = function (name) {
};
Server.prototype.unloadChannel = function (chan, options) {
var self = this;
if (chan.dead || chan.dying) {
return;
}
@ -302,8 +304,6 @@ Server.prototype.unloadChannel = function (chan, options) {
finishUnloading();
}
var self = this;
function finishUnloading() {
chan.logger.log("[init] Channel shutting down");
chan.logger.close();