Skip to content

Commit b49eda5

Browse files
committed
Address comments
1 parent 9122fb3 commit b49eda5

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

lib/service.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
const rclnodejs = require('./native_loader.js');
1818
const DistroUtils = require('./distro.js');
1919
const Entity = require('./entity.js');
20+
const Logging = require('./logging.js');
2021
const debug = require('debug')('rclnodejs:service');
2122

2223
/**
@@ -88,7 +89,8 @@ class Service extends Entity {
8889
);
8990
})
9091
.catch((error) => {
91-
debug(`Error processing ${this._serviceName} request: ${error}`);
92+
const logger = Logging.getLogger('rclnodejs');
93+
logger.error(`Error processing ${this._serviceName} request: ${error}`);
9294
});
9395
}
9496

lib/time_source.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class TimeSource {
7373
});
7474
if (enabled) {
7575
this._subscribeToClockTopic();
76+
} else if (this._node && this._clockSubscription) {
77+
this._node.destroySubscription(this._clockSubscription);
78+
this._clockSubscription = undefined;
7679
}
7780
}
7881

0 commit comments

Comments
 (0)