Split node: avoid duplicate done call for buffer split

Fixes #3982
This commit is contained in:
Nick O'Leary 2023-01-01 22:21:49 +00:00
parent b3ce0c0079
commit 74794fea09
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 3 additions and 1 deletions

View File

@ -251,7 +251,9 @@ module.exports = function(RED) {
}
else {
node.buffer = buff.slice(p,buff.length);
node.pendingDones.push(done);
if (node.buffer.length > 0) {
node.pendingDones.push(done);
}
}
if (node.buffer.length == 0) {
done();