mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
tidied up implementation of file node close fix
This commit is contained in:
parent
160c27c15a
commit
dded98e30c
@ -63,7 +63,7 @@ module.exports = function(RED) {
|
||||
node.wstream.on("error", function(err) {
|
||||
node.error(RED._("file.errors.writefail",{error:err.toString()}),msg);
|
||||
});
|
||||
node.wstream.write(node.data.shift(), function() { node.wstream.end(); });
|
||||
node.wstream.end(node.data.shift());
|
||||
}
|
||||
else {
|
||||
if ((!node.wstream) || (!node.filename)) {
|
||||
@ -73,7 +73,7 @@ module.exports = function(RED) {
|
||||
});
|
||||
}
|
||||
if (node.filename) { node.wstream.write(node.data.shift()); }
|
||||
else { node.wstream.write(node.data.shift(), function() { node.wstream.end(); }); }
|
||||
else { node.wstream.end(node.data.shift()); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user