mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
SPLIT Join node - support for payload.resetTimeout to restore original timeout
This commit is contained in:
parent
f1e7ec0c6b
commit
cf2d5841f5
@ -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) {
|
||||
|
@ -118,6 +118,7 @@
|
||||
<p>A <i>timeout</i> can be set to trigger sending the new message using whatever has been received so far.</p>
|
||||
<p>If a message is received with the <code>msg.complete</code> property set, the output message is finalised and sent.
|
||||
This resets any part counts.</p>
|
||||
<p>If a message is received with the <code>msg.resetTimeout</code> property set, the timer for the partly complete message is reset to the original time.
|
||||
<p>If a message is received with the <code>msg.reset</code> property set, the partly complete message is deleted and not sent.
|
||||
This resets any part counts.</p>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user