Minor tweaks to specific error conditions
This commit is contained in:
parent
79556d9365
commit
726a5bf7c4
|
@ -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;
|
||||
}
|
||||
|
|
16
src/user.js
16
src/user.js
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue