Minor tweaks to specific error conditions

This commit is contained in:
Calvin Montgomery 2018-02-24 19:51:16 -08:00
parent 79556d9365
commit 726a5bf7c4
2 changed files with 10 additions and 13 deletions

View file

@ -320,9 +320,12 @@ Channel.prototype.checkModules = function (fn, args, cb) {
if (!self.modules) {
LOGGER.warn(
'checkModules(%s): self.modules is undefined; dead=%s',
'checkModules(%s): self.modules is undefined; dead=%s,' +
' current=%s, remaining=%s',
fn,
self.dead
self.dead,
m,
keys
);
return;
}

View file

@ -243,17 +243,11 @@ User.prototype.setAFK = function (afk) {
}
if (!this.inChannel()) {
// I haven't exactly nailed down why this.channel can
// become null halfway through the function, but based
// on log analysis I suspect it's because this.socket.emit()
// can fire the "disconnect" event which then tears down
// the User object.
LOGGER.warn(
"Encountered this.channel == null from setAFK. " +
"this.dead=%t this.flags=%b",
this.dead,
this.flags
);
/*
* In unusual circumstances, the above emit("clearVoteskipVote")
* can cause the "disconnect" event to be fired synchronously,
* which results in this user no longer being in the channel.
*/
return;
}