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

Join node - clear timeout when msg.reset received

Fixes #2471
This commit is contained in:
Nick O'Leary 2020-06-24 10:02:42 +01:00
parent 8080ed4787
commit 209c5f337c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -446,7 +446,7 @@ module.exports = function(RED) {
buffers.push(joinBuffer);
bufferLen += joinBuffer.length;
}
if (!Buffer.isBuffer(group.payload[i])) {
if (!Buffer.isBuffer(group.payload[i])) {
group.payload[i] = Buffer.from(group.payload[i]);
}
buffers.push(group.payload[i]);
@ -573,7 +573,15 @@ module.exports = function(RED) {
}
}
if (msg.hasOwnProperty("reset")) { if (inflight[partId]) { delete inflight[partId] }; return; }
if (msg.hasOwnProperty("reset")) {
if (inflight[partId]) {
if (inflight[partId].timeout) {
clearTimeout(inflight[partId].timeout);
}
delete inflight[partId]
}
return
}
if ((payloadType === 'object') && (propertyKey === null || propertyKey === undefined || propertyKey === "")) {
if (node.mode === "auto") {