1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-21 07:38: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:
Jonas Jenwald 2018-01-17 12:45:23 +01:00 committed by GitHub
commit f774abc8d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();