Prevent double userLeave
This commit is contained in:
parent
0db5f64b15
commit
9e56400f53
2 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue