From 1f7cf66367e3e19c2a3d57d59480ebb4dfb790a1 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Fri, 21 Mar 2014 09:26:41 -0500 Subject: [PATCH] Fix minor issue with preJoin patch --- lib/channel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } });