Skip to content

Commit fd193d2

Browse files
committed
minor changes from post-merge testing
1 parent 498e705 commit fd193d2

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

example.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ rosnodejs.initNode('/my_node')
3030
serviceClient.call(request).then((resp) => {
3131
rosnodejs.log.info('Service response 2 ' + JSON.stringify(resp));
3232
});
33+
})
34+
.then(() => {
35+
let serviceClient2 = rosNode.serviceClient('/set_bool', 'std_srvs/SetBool');
36+
serviceClient2.call(request).then((resp) => {
37+
rosnodejs.log.info('Non persistent response ' + JSON.stringify(resp));
38+
})
3339
});
3440
}
3541
});

lib/ServiceServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ServiceServer extends EventEmitter {
122122
// finish serialization and write msg
123123
client.write(Buffer.concat(bufferInfo.buffer, bufferInfo.length));
124124
if (!client.$persist) {
125-
this._log.info('closing non-persistent client');
125+
this._log.debug('Closing non-persistent client');
126126
client.end();
127127
}
128128
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"walker" : "1.0.7",
2929
"md5" : "2.1.0",
3030
"async" : "0.1.22",
31-
"bunyan": "1.8.1",
31+
"bunyan": "1.8.1"
3232
}
3333
}

test/Log.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,20 @@ describe('Logging', () => {
340340
});
341341

342342
it('Check Publishing', (done) => {
343+
const nh = rosnodejs.nh;
343344
const message = 'This is my message';
344345
let intervalId = null;
345346

346347
const rosoutCallback = (msg) => {
347348
expect(msg.msg).to.have.string(message);
348349
if (intervalId !== null) {
350+
nh.unsubscribe('/rosout');
349351
clearInterval(intervalId);
350352
intervalId = null;
351353
done();
352354
}
353355
};
354356

355-
const nh = rosnodejs.nh;
356357
const sub = nh.subscribe('/rosout', 'rosgraph_msgs/Log', rosoutCallback);
357358

358359
intervalId = setInterval(() => {

0 commit comments

Comments
 (0)