1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3261 from node-red/fix-delay-2nd-output-when-in-per-topic-mode

fix 2nd output when in rate limit per topic modes
This commit is contained in:
Nick O'Leary 2021-11-22 23:23:35 +00:00 committed by GitHub
commit cb88cc35e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,6 +372,7 @@ module.exports = function(RED) {
hit = false;
for (var b in node.buffer) { // check if already in queue
if (msg.topic === node.buffer[b].msg.topic) {
if (node.outputs === 2) { send([null,node.buffer[b].msg]) }
node.buffer[b].done();
node.buffer[b] = {msg, send, done}; // if so - replace existing entry
hit = true;