SPLIT Join node - support for payload.resetTimeout to restore original timeout

This commit is contained in:
Magnus Månsson
2021-08-25 12:52:10 +02:00
parent f1e7ec0c6b
commit cf2d5841f5
2 changed files with 14 additions and 0 deletions

View File

@@ -631,6 +631,19 @@ module.exports = function(RED) {
}
}
if (msg.hasOwnProperty("resetTimeout")) {
if (inflight[partId]) {
if (inflight[partId].timeout) {
clearTimeout(inflight[partId].timeout);
}
if (node.timer > 0) {
inflight[partId].timeout = setTimeout(function() {
completeSend(partId)
}, node.timer)
}
}
}
if (msg.hasOwnProperty("reset")) {
if (inflight[partId]) {
if (inflight[partId].timeout) {