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);
|
||||
stream.on('finish', function() {
|
||||
stream.close();
|
||||
stream.end();
|
||||
if (!completed) {
|
||||
completed = true;
|
||||
callback();
|
||||
|
Loading…
Reference in New Issue
Block a user