mirror of https://github.com/node-red/node-red.git
parent
9ec7bb8d41
commit
78eae99bd4
|
@ -70,8 +70,9 @@ module.exports = function(RED) {
|
||||||
if (node.duration === 0) { tout = 0; }
|
if (node.duration === 0) { tout = 0; }
|
||||||
else {
|
else {
|
||||||
tout = setTimeout(function() {
|
tout = setTimeout(function() {
|
||||||
msg.payload = m2;
|
var msg2 = RED.util.cloneMessage(msg);
|
||||||
if (node.op2type !== "nul") { node.send(msg); }
|
msg2.payload = m2;
|
||||||
|
if (node.op2type !== "nul") { node.send(msg2); }
|
||||||
tout = null;
|
tout = null;
|
||||||
node.status({});
|
node.status({});
|
||||||
},node.duration);
|
},node.duration);
|
||||||
|
@ -82,8 +83,9 @@ module.exports = function(RED) {
|
||||||
clearTimeout(tout);
|
clearTimeout(tout);
|
||||||
if (node.op2type === "payl") { m2 = msg.payload; }
|
if (node.op2type === "payl") { m2 = msg.payload; }
|
||||||
tout = setTimeout(function() {
|
tout = setTimeout(function() {
|
||||||
msg.payload = m2;
|
var msg2 = RED.util.cloneMessage(msg);
|
||||||
if (node.op2type !== "nul") { node.send(msg); }
|
msg2.payload = m2;
|
||||||
|
if (node.op2type !== "nul") { node.send(msg2); }
|
||||||
tout = null;
|
tout = null;
|
||||||
node.status({});
|
node.status({});
|
||||||
},node.duration);
|
},node.duration);
|
||||||
|
|
Loading…
Reference in New Issue