diff --git a/src/channel/channel.js b/src/channel/channel.js index 72a84092..e0f4071d 100644 --- a/src/channel/channel.js +++ b/src/channel/channel.js @@ -369,6 +369,14 @@ Channel.prototype.joinUser = function (user, data) { user.channel = self; user.waitFlag(Flags.U_LOGGED_IN, () => { + if (self.dead) { + LOGGER.warn( + 'Got U_LOGGED_IN for %s after channel already unloaded', + user.getName() + ); + return; + } + if (user.is(Flags.U_REGISTERED)) { db.channels.getRank(self.name, user.getName(), (error, rank) => { if (!error) {