mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #9368 from acchou/9362
end() is the official way to release a Writable stream
This commit is contained in:
commit
f774abc8d3
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue