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) { if (!self.modules) {
LOGGER.warn( LOGGER.warn(
'checkModules(%s): self.modules is undefined; dead=%s', 'checkModules(%s): self.modules is undefined; dead=%s,' +
' current=%s, remaining=%s',
fn, fn,
self.dead self.dead,
m,
keys
); );
return; return;
} }

View File

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