Merge pull request #103 from wearetrail/master

Ensure message format availability
This commit is contained in:
Brandon Nozaki Miller 2017-02-14 03:10:43 -08:00 committed by GitHub
commit fad4cbb683
3 changed files with 11 additions and 10 deletions

View File

@ -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,

View File

@ -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"
]
}

View File

@ -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(){