Minor tweaks/fixes

This commit is contained in:
Calvin Montgomery 2017-12-15 19:10:32 -08:00
parent 29be9233e9
commit 7fbd62142e
3 changed files with 14 additions and 9 deletions

View File

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

View File

@ -303,12 +303,15 @@ exports.ffprobe = function ffprobe(filename, cb) {
var stdout = "";
var stderr = "";
var timer = setTimeout(function () {
LOGGER.error("Possible runaway ffprobe process for file " + filename);
LOGGER.warn("Timed out when probing " + filename);
fflog("Killing ffprobe for " + filename + " after " + (TIMEOUT/1000) + " seconds");
childErr = new Error("File query exceeded time limit of " + (TIMEOUT/1000) +
" seconds. To avoid this issue, encode your videos " +
"using the 'faststart' option: " +
"https://trac.ffmpeg.org/wiki/Encode/H.264#faststartforwebvideo");
childErr = new Error(
"File query exceeded time limit of " + (TIMEOUT/1000) +
" seconds. This can be caused if the remote server is far " +
"away or if you did not encode the video " +
"using the 'faststart' option: " +
"https://trac.ffmpeg.org/wiki/Encode/H.264#faststartforwebvideo"
);
child.kill("SIGKILL");
}, TIMEOUT);

View File

@ -284,10 +284,12 @@ Server.prototype.getChannel = function (name) {
};
Server.prototype.unloadChannel = function (chan, options) {
if (chan.dead) {
if (chan.dead || chan.dying) {
return;
}
chan.dying = true;
if (!options) {
options = {};
}
@ -509,7 +511,7 @@ Server.prototype.handleChannelDelete = function (event) {
u.kick('Channel deleted');
});
if (!channel.dead) {
if (!channel.dead && !channel.dying) {
channel.emit('empty');
}
@ -536,7 +538,7 @@ Server.prototype.handleChannelRegister = function (event) {
u.kick('Channel reloading');
});
if (!channel.dead) {
if (!channel.dead && !channel.dying) {
channel.emit('empty');
}