only register input listener once on daemon node

to close #365
This commit is contained in:
Dave Conway-Jones 2017-10-28 23:12:39 +01:00
parent 3e8353fa0e
commit cabf9ad00c
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 3 additions and 3 deletions

View File

@ -46,8 +46,6 @@ module.exports = function(RED) {
node.running = true;
var line = "";
node.on("input", inputlistener);
node.child.stdout.on('data', function (data) {
if (node.op === "string") { data = data.toString(); }
if (node.op === "number") { data = Number(data); }
@ -111,6 +109,8 @@ module.exports = function(RED) {
});
runit();
node.on("input", inputlistener);
}
RED.nodes.registerType("daemon",DaemonNode);
}

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-daemon",
"version" : "0.0.15",
"version" : "0.0.16",
"description" : "A Node-RED node that runs and monitors a long running system command.",
"dependencies" : {
},