mirror of https://github.com/calzoneman/sync.git
Destroy socket on disconnect to prevent dangling sockets
This commit is contained in:
parent
3f2095b14e
commit
0b1a27a131
|
@ -317,6 +317,7 @@ Channel.prototype.userLeave = function(user) {
|
||||||
// Their socket might already be dead, so wrap in a try-catch
|
// Their socket might already be dead, so wrap in a try-catch
|
||||||
try {
|
try {
|
||||||
user.socket.leave(this.name);
|
user.socket.leave(this.name);
|
||||||
|
user.socket.destroy();
|
||||||
}
|
}
|
||||||
catch(e) {}
|
catch(e) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue