Skip to content

Commit

Permalink
Merge pull request #9368 from acchou/9362
Browse files Browse the repository at this point in the history
end() is the official way to release a Writable stream
  • Loading branch information
Snuffleupagus committed Jan 17, 2018
2 parents 22a9274 + b867c32 commit f774abc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/downloadutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f774abc

Please sign in to comment.