Merge pull request #103 from wearetrail/master
Ensure message format availability
This commit is contained in:
commit
fad4cbb683
3 changed files with 11 additions and 10 deletions
|
@ -176,12 +176,13 @@ function gotData(socket,data,UDPSocket){
|
||||||
let message=new Message;
|
let message=new Message;
|
||||||
message.load(data.shift());
|
message.load(data.shift());
|
||||||
|
|
||||||
this.log('received event of : ',message.type,message.data);
|
// Only set the sock id if it is specified.
|
||||||
|
if (message.data && message.data.id){
|
||||||
if(message.data.id){
|
|
||||||
sock.id=message.data.id;
|
sock.id=message.data.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.log('received event of : ',message.type,message.data);
|
||||||
|
|
||||||
this.publish(
|
this.publish(
|
||||||
message.type,
|
message.type,
|
||||||
message.data,
|
message.data,
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"spec_dir": "spec",
|
"spec_dir": "spec",
|
||||||
"spec_files": [
|
"spec_files": [
|
||||||
"/support/jasmineTest/testFile.js",
|
"support/jasmineTest/testFile.js",
|
||||||
|
|
||||||
"/support/jasmineTest/Unix/unixSocketClient.spec.js",
|
"support/jasmineTest/Unix/unixSocketClient.spec.js",
|
||||||
"/support/jasmineTest/UDP/udpSocketClient.spec.js",
|
"support/jasmineTest/UDP/udpSocketClient.spec.js",
|
||||||
"/support/jasmineTest/TCP/tcpSocketClient.spec.js",
|
"support/jasmineTest/TCP/tcpSocketClient.spec.js",
|
||||||
"/support/jasmineTest/Unix/unixSocketServer.spec.js",
|
"support/jasmineTest/Unix/unixSocketServer.spec.js",
|
||||||
|
|
||||||
"/support/jasmineTest/TCP/tcpSocketServer.spec.js"
|
"support/jasmineTest/TCP/tcpSocketServer.spec.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
const ipc = require('../../../../node-ipc');
|
const ipc = require('../../../../node-ipc');
|
||||||
|
|
||||||
ipc.config.id ='testClient';
|
ipc.config.id ='testClient';
|
||||||
ipc.config.retry = 600;
|
ipc.config.retry = 900;
|
||||||
|
|
||||||
describe('Test Cases for Unix client: ',
|
describe('Test Cases for Unix client: ',
|
||||||
function UnixClientSpec(){
|
function UnixClientSpec(){
|
||||||
|
|
Loading…
Reference in a new issue