let split node reassemble based on a final packet. (as well as the first)

This commit is contained in:
Dave Conway-Jones 2017-06-16 09:16:23 +01:00
parent 56405ac903
commit 55110dfbac
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ module.exports = function(RED) {
}
// TODO: currently reuse the last received - add option to pick first received
group.msg = msg;
if (group.currentCount >= group.targetCount || msg.hasOwnProperty('complete')) {
if (group.currentCount >= (group.targetCount || msg.parts.count) || msg.hasOwnProperty('complete')) {
completeSend(partId);
}
} catch(err) {