Fixes #32
This commit is contained in:
parent
82a3e47dcc
commit
766442d281
@ -78,9 +78,6 @@ PeerServer.prototype._initializeWSS = function() {
|
||||
self._clients[key][id] = { token: token, ip: ip };
|
||||
self._ips[ip]++;
|
||||
socket.send(JSON.stringify({ type: 'OPEN' }));
|
||||
// We're going to emit here, because for XHR we don't *know* when someone
|
||||
// disconnects.
|
||||
self.emit('connection', id);
|
||||
}
|
||||
self._configureWS(socket, key, id, token);
|
||||
} else {
|
||||
@ -141,6 +138,10 @@ PeerServer.prototype._configureWS = function(socket, key, id, token) {
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
|
||||
// We're going to emit here, because for XHR we don't *know* when someone
|
||||
// disconnects.
|
||||
this.emit('connection', id);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user