1
0
Fork 0
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:
Andy Chou 2018-01-16 12:01:33 -08:00
parent f299473697
commit b867c3299b

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