This commit is contained in:
Kewin Brandsma 2016-10-04 21:08:42 +02:00
parent 15e628b528
commit 03077e308a
2 changed files with 6 additions and 5 deletions

View file

@ -222,8 +222,8 @@ function connect(){
if (message.type === '__identify') {
client.emit('__identify', {
id: client.id,
path: client.path
id: client.config.id
//path: client.path
});
continue;
}

View file

@ -248,11 +248,12 @@ function serverCreated(socket) {
);
} else {
this.on('__identify', function(clientDetails) {
var id = clientDetails.id;
var id = clientDetails.id,
clientConfig = Object.assign(this.config, {id: clientDetails.id, path: clientDetails.path});
this.of[id] = new Client(this.config, this.log, socket);
this.of[id] = new Client(clientConfig, this.log, socket);
this.of[id].id = id;
this.of[id].path = clientDetails.path;
this.of[id].path = clientConfig.path;
this.of[id].on('disconnect', function() {
delete this.of[id];