forked from RnD/machineGroupControl
bug fixes
This commit is contained in:
@@ -192,10 +192,12 @@ class nodeClass {
|
||||
_attachInputHandler() {
|
||||
this.node.on(
|
||||
"input",
|
||||
(msg, send, done) =>
|
||||
async function () {
|
||||
async (msg, send, done) => {
|
||||
const mg = this.source;
|
||||
const RED = this.RED;
|
||||
switch (msg.topic) {
|
||||
case "registerChild":
|
||||
console.log(`Registering child in mgc: ${msg.payload}`);
|
||||
const childId = msg.payload;
|
||||
const childObj = RED.nodes.getNode(childId);
|
||||
mg.childRegistrationUtils.registerChild(
|
||||
@@ -235,6 +237,7 @@ class nodeClass {
|
||||
|
||||
default:
|
||||
// Handle unknown topics if needed
|
||||
mg.logger.warn(`Unknown topic: ${msg.topic}`);
|
||||
break;
|
||||
}
|
||||
done();
|
||||
@@ -248,6 +251,7 @@ class nodeClass {
|
||||
_attachCloseHandler() {
|
||||
this.node.on("close", (done) => {
|
||||
clearInterval(this._tickInterval);
|
||||
clearInterval(this._statusInterval);
|
||||
done();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user