Skip to content

Commit

Permalink
connect and disconnect events fixed to use now proxy object instead o…
Browse files Browse the repository at this point in the history
…f scope
  • Loading branch information
Sridatta Thatipamala committed Apr 25, 2011
1 parent 601de17 commit 80f7daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/clientGroup.js
Expand Up @@ -73,7 +73,7 @@ exports.ClientGroup = function ClientGroup(nowCore, socket, groupName){

this.count++;

this.emit.apply({_events: this._events, now: groupScopes[clientId], user:{clientId: clientId}}, ['connect', clientId]);
this.emit.apply({_events: this._events, now: nowCore.proxies[clientId], user:{clientId: clientId}}, ['connect', clientId]);
} else {
throw new Error("Invalid client id");
}
Expand All @@ -85,7 +85,7 @@ exports.ClientGroup = function ClientGroup(nowCore, socket, groupName){

this.count--;

this.emit.apply({_events: this._events, now: groupScopes[clientId], user:{clientId: clientId}}, ['disconnect', clientId]);
this.emit.apply({_events: this._events, now: nowCore.proxies[clientId], user:{clientId: clientId}}, ['disconnect', clientId]);
delete groupScopes[clientId];
}
};
Expand Down

0 comments on commit 80f7daf

Please sign in to comment.