From 03077e308a8ad1bb9e679df9b533f65042091b27 Mon Sep 17 00:00:00 2001 From: Kewin Brandsma Date: Tue, 4 Oct 2016 21:08:42 +0200 Subject: [PATCH] wip --- dao/client.js | 4 ++-- dao/socketServer.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dao/client.js b/dao/client.js index 04ab488..6213cec 100644 --- a/dao/client.js +++ b/dao/client.js @@ -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; } diff --git a/dao/socketServer.js b/dao/socketServer.js index cfc0be9..d551eaf 100644 --- a/dao/socketServer.js +++ b/dao/socketServer.js @@ -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];