mirror of
https://github.com/node-red/node-red
synced 2024-11-21 07:33:58 +00:00
do add to queue in case it needs to also be flushed
This commit is contained in:
parent
33a5b2527c
commit
d3219f0600
@ -253,11 +253,15 @@ module.exports = function(RED) {
|
||||
if (node.allowrate && m.hasOwnProperty("rate") && !isNaN(parseFloat(m.rate))) {
|
||||
node.rate = m.rate;
|
||||
}
|
||||
if (!msg.hasOwnProperty("reset")) {
|
||||
send(m);
|
||||
node.reportDepth();
|
||||
node.intervalID = setInterval(sendMsgFromBuffer, node.rate);
|
||||
if (msg.hasOwnProperty("reset")) {
|
||||
if (msg.hasOwnProperty("flush")) {
|
||||
node.buffer.push({msg: m, send: send, done: done});
|
||||
}
|
||||
}
|
||||
else { send(m); }
|
||||
|
||||
node.reportDepth();
|
||||
node.intervalID = setInterval(sendMsgFromBuffer, node.rate);
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user