mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Avoid exceeding call stack when draining message group in Switch
Fixes #5013
This commit is contained in:
parent
1e8f840993
commit
953b7584a3
@ -352,7 +352,9 @@ module.exports = function(RED) {
|
|||||||
if (msgs.length === 0) {
|
if (msgs.length === 0) {
|
||||||
done()
|
done()
|
||||||
} else {
|
} else {
|
||||||
|
setImmediate(() => {
|
||||||
drainMessageGroup(msgs,count,done);
|
drainMessageGroup(msgs,count,done);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -505,7 +507,9 @@ module.exports = function(RED) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
node.error(err,nextMsg);
|
node.error(err,nextMsg);
|
||||||
}
|
}
|
||||||
|
setImmediate(() => {
|
||||||
processMessageQueue()
|
processMessageQueue()
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user