diff --git a/dao/socketServer.js b/dao/socketServer.js index 0c45d25..0296196 100644 --- a/dao/socketServer.js +++ b/dao/socketServer.js @@ -176,12 +176,13 @@ function gotData(socket,data,UDPSocket){ let message=new Message; message.load(data.shift()); - this.log('received event of : ',message.type,message.data); - - if(message.data.id){ + // Only set the sock id if it is specified. + if (message.data && message.data.id){ sock.id=message.data.id; } + this.log('received event of : ',message.type,message.data); + this.publish( message.type, message.data, diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json index c8acc47..636c1b9 100644 --- a/spec/support/jasmine.json +++ b/spec/support/jasmine.json @@ -1,13 +1,13 @@ { "spec_dir": "spec", "spec_files": [ - "/support/jasmineTest/testFile.js", + "support/jasmineTest/testFile.js", - "/support/jasmineTest/Unix/unixSocketClient.spec.js", - "/support/jasmineTest/UDP/udpSocketClient.spec.js", - "/support/jasmineTest/TCP/tcpSocketClient.spec.js", - "/support/jasmineTest/Unix/unixSocketServer.spec.js", + "support/jasmineTest/Unix/unixSocketClient.spec.js", + "support/jasmineTest/UDP/udpSocketClient.spec.js", + "support/jasmineTest/TCP/tcpSocketClient.spec.js", + "support/jasmineTest/Unix/unixSocketServer.spec.js", - "/support/jasmineTest/TCP/tcpSocketServer.spec.js" + "support/jasmineTest/TCP/tcpSocketServer.spec.js" ] } diff --git a/spec/support/jasmineTest/Unix/unixSocketClient.spec.js b/spec/support/jasmineTest/Unix/unixSocketClient.spec.js index 7da2500..cbc0d4a 100644 --- a/spec/support/jasmineTest/Unix/unixSocketClient.spec.js +++ b/spec/support/jasmineTest/Unix/unixSocketClient.spec.js @@ -4,7 +4,7 @@ const ipc = require('../../../../node-ipc'); ipc.config.id ='testClient'; -ipc.config.retry = 600; +ipc.config.retry = 900; describe('Test Cases for Unix client: ', function UnixClientSpec(){