Skip to content

Commit b26a606

Browse files
committed
1. Removed req.end(), fixed typo
1 parent 5875c80 commit b26a606

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/wget.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function download(src, output, options, parentEvent, redirects = 0) {
3030
};
3131
}
3232
let srcUrl = url.parse(src);
33-
if (!srcUrl.protocol || srcUrl.prototype === null) {
33+
if (!srcUrl.protocol || srcUrl.protocol === null) {
3434
downloader.emit(
3535
'error',
3636
'Cannot parse url protocol for ' +
@@ -126,7 +126,6 @@ function download(src, output, options, parentEvent, redirects = 0) {
126126
writeStream.end();
127127
downloader.emit('progress', 1);
128128
downloader.emit('end', 'Finished writing to disk');
129-
req.end();
130129
});
131130
} else if (!handledCodes.includes(res.statusCode)) {
132131
downloader.emit(

0 commit comments

Comments
 (0)