diff --git a/lib/channel.js b/lib/channel.js index dad928f6..3ce50eee 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -469,7 +469,7 @@ Channel.prototype.preJoin = function (user, password) { // Allow channel to unload if the only user disconnects without finishing a join user.socket.on("disconnect", function () { - if (!user.inChannel() && self.users.length === 0) { + if (!user.inChannel() && !self.dead && self.users.length === 0) { self.emit("empty"); } });