From bc7a2e0ff17497bcf0906afcd8ecacefdfdc1027 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 22 Oct 2013 13:42:07 -0500 Subject: [PATCH] Fix channel dead race condition (another one) --- changelog | 3 +++ lib/channel.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/changelog b/changelog index b6dd4ea5..af06329e 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +Tue Oct 22 13:41 2013 CDT + * lib/channel.js: Fix a channel dead race condition + Sun Oct 20 20:02 2013 CDT * lib/channel.js: Fix MOTD XSS filter stripping style tags diff --git a/lib/channel.js b/lib/channel.js index 81ff68c8..784c9f40 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -1066,6 +1066,9 @@ Channel.prototype.broadcastNewUser = function(user) { user.socket.emit("rank", user.rank); } self.server.db.listAliases(user.ip, function (err, aliases) { + if (self.dead) + return; + if(err) { aliases = []; }