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

Merge pull request #4000 from node-red/fix-split-stream

Split node: avoid duplicate done call for buffer split
This commit is contained in:
Nick O'Leary 2023-01-23 17:04:31 +00:00 committed by GitHub
commit 7dbbafec1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();