end() is the official way to release a Writable stream
This commit is contained in:
parent
f299473697
commit
b867c3299b
@ -75,7 +75,7 @@ function downloadFile(file, url, callback, redirects) {
|
|||||||
});
|
});
|
||||||
response.pipe(stream);
|
response.pipe(stream);
|
||||||
stream.on('finish', function() {
|
stream.on('finish', function() {
|
||||||
stream.close();
|
stream.end();
|
||||||
if (!completed) {
|
if (!completed) {
|
||||||
completed = true;
|
completed = true;
|
||||||
callback();
|
callback();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user