mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Let daemon node call done() so it has time to kill child process
This commit is contained in:
parent
31cb3d1e46
commit
83ea35d0dd
@ -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();
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-daemon",
|
||||
"version" : "0.0.9",
|
||||
"version" : "0.0.10",
|
||||
"description" : "A Node-RED node that runs and monitors a long running system command.",
|
||||
"dependencies" : {
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user