mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-12-27 07:21:08 +01:00
Let daemon node call done() so it has time to kill child process
This commit is contained in:
@@ -86,11 +86,12 @@ module.exports = function(RED) {
|
||||
}, 10000); // Restart after 10 secs if required
|
||||
}
|
||||
|
||||
node.on("close", function() {
|
||||
node.on("close", function(done) {
|
||||
clearInterval(loop);
|
||||
if (node.child != null) { node.child.kill('SIGKILL'); }
|
||||
if (RED.settings.verbose) { node.log(node.cmd+" stopped"); }
|
||||
clearInterval(loop);
|
||||
node.status({});
|
||||
setTimeout(function() { done(); }, 100);
|
||||
});
|
||||
|
||||
runit();
|
||||
|
||||
Reference in New Issue
Block a user