Removed the join callback, since it's not necessary (TCP based pub/sub guarantees

proper total ordering).
This commit is contained in:
Guillermo Rauch
2011-06-27 15:30:47 -03:00
parent f06fefab14
commit 9aa650e430

View File

@@ -214,11 +214,14 @@ SocketNamespace.prototype.handlePacket = function (sessid, packet) {
switch (packet.type) {
case 'connect':
this.store.join(sessid, this.name, function () {
// packet echo
socket.packet({ type: 'connect' });
self.emit('connection', socket);
});
this.manager.onJoin(sessid, this.name);
this.store.publish('join', sessid, this.name);
// packet echo
socket.packet({ type: 'connect' });
// emit connection event
self.emit('connection', socket);
break;
case 'ack':