Merge pull request #2748 from neuroforgede/master

make split node work with out of order messages
This commit is contained in:
Nick O'Leary
2021-01-27 20:35:32 +00:00
committed by GitHub
2 changed files with 41 additions and 1 deletions

View File

@@ -677,7 +677,10 @@ module.exports = function(RED) {
}
group.msg = Object.assign(group.msg, msg);
var tcnt = group.targetCount;
if (msg.hasOwnProperty("parts")) { tcnt = group.targetCount || msg.parts.count; }
if (msg.hasOwnProperty("parts")) {
tcnt = group.targetCount || msg.parts.count;
group.targetCount = tcnt;
}
if ((tcnt > 0 && group.currentCount >= tcnt) || msg.hasOwnProperty('complete')) {
completeSend(partId);
}
@@ -697,3 +700,4 @@ module.exports = function(RED) {
}
RED.nodes.registerType("join",JoinNode);
}