mirror of https://github.com/calzoneman/sync.git
Prevent double userLeave
This commit is contained in:
parent
0db5f64b15
commit
9e56400f53
|
@ -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
|
Tue Nov 05 22:38 2013 CDT
|
||||||
* lib/database.js: Add a check for registrations-in-progress to prevent
|
* lib/database.js: Add a check for registrations-in-progress to prevent
|
||||||
duplicate queries by an impatient user
|
duplicate queries by an impatient user
|
||||||
|
|
|
@ -860,6 +860,7 @@ Channel.prototype.userJoin = function(user) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Channel.prototype.userLeave = function(user) {
|
Channel.prototype.userLeave = function(user) {
|
||||||
|
user.channel = null;
|
||||||
// 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);
|
||||||
|
|
Loading…
Reference in New Issue