From 55110dfbac27c00d4ab42adcf29077a299bee032 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 16 Jun 2017 09:16:23 +0100 Subject: [PATCH] let split node reassemble based on a final packet. (as well as the first) --- nodes/core/logic/17-split.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/logic/17-split.js b/nodes/core/logic/17-split.js index 083feaeec..47c97f8d0 100644 --- a/nodes/core/logic/17-split.js +++ b/nodes/core/logic/17-split.js @@ -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) {