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

View File

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