mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
end() is the official way to release a Writable stream
This commit is contained in:
parent
f299473697
commit
b867c3299b
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