mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
make split node work with out of order messages as long as one of the messages has msg.parts.count set to the proper value
This commit is contained in:
parent
280203e64e
commit
468cfeffb6
@ -677,7 +677,10 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
group.msg = Object.assign(group.msg, msg);
|
group.msg = Object.assign(group.msg, msg);
|
||||||
var tcnt = group.targetCount;
|
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')) {
|
if ((tcnt > 0 && group.currentCount >= tcnt) || msg.hasOwnProperty('complete')) {
|
||||||
completeSend(partId);
|
completeSend(partId);
|
||||||
}
|
}
|
||||||
@ -697,3 +700,4 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
RED.nodes.registerType("join",JoinNode);
|
RED.nodes.registerType("join",JoinNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user