diff --git a/changelog b/changelog index 154f6172..6db96fe4 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +Tue Nov 05 22:43 2013 CDT + * lib/channel.js: Set user.channel = null in userLeave to prevent + double execution of userLeave. + Tue Nov 05 22:38 2013 CDT * lib/database.js: Add a check for registrations-in-progress to prevent duplicate queries by an impatient user diff --git a/lib/channel.js b/lib/channel.js index 784c9f40..0fe7a4ef 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -860,6 +860,7 @@ Channel.prototype.userJoin = function(user) { } Channel.prototype.userLeave = function(user) { + user.channel = null; // Their socket might already be dead, so wrap in a try-catch try { user.socket.leave(this.name);