wip
This commit is contained in:
parent
15e628b528
commit
03077e308a
2 changed files with 6 additions and 5 deletions
|
@ -222,8 +222,8 @@ function connect(){
|
||||||
|
|
||||||
if (message.type === '__identify') {
|
if (message.type === '__identify') {
|
||||||
client.emit('__identify', {
|
client.emit('__identify', {
|
||||||
id: client.id,
|
id: client.config.id
|
||||||
path: client.path
|
//path: client.path
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,11 +248,12 @@ function serverCreated(socket) {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.on('__identify', function(clientDetails) {
|
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].id = id;
|
||||||
this.of[id].path = clientDetails.path;
|
this.of[id].path = clientConfig.path;
|
||||||
|
|
||||||
this.of[id].on('disconnect', function() {
|
this.of[id].on('disconnect', function() {
|
||||||
delete this.of[id];
|
delete this.of[id];
|
||||||
|
|
Loading…
Reference in a new issue