From f63d8d6343cdb9de7e64b210c8f8bab8758277e2 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Mon, 17 Oct 2016 21:35:12 +0100 Subject: [PATCH] Daemon node. Check payload length rather than trim to handle buffer to close #242 thanks @gbrault --- utility/daemon/daemon.js | 2 +- utility/daemon/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utility/daemon/daemon.js b/utility/daemon/daemon.js index 6282c345..7e343616 100644 --- a/utility/daemon/daemon.js +++ b/utility/daemon/daemon.js @@ -62,7 +62,7 @@ module.exports = function(RED) { } line = bits[0]; } else { - if (data && data.trim() !== "") { + if (data && (data.length !== 0)) { node.send([{payload:data},null,null]); } } diff --git a/utility/daemon/package.json b/utility/daemon/package.json index 6462fda8..87d16c4e 100644 --- a/utility/daemon/package.json +++ b/utility/daemon/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-daemon", - "version" : "0.0.7", + "version" : "0.0.8", "description" : "A Node-RED node that runs and monitors a long running system command.", "dependencies" : { },