kevva / download

Download and extract files
MIT License
1.28k stars 200 forks source link

Timeout is not working... #187

Open pbvahlst opened 4 years ago

pbvahlst commented 4 years ago

The following does never end if the server does not respond. There seem to have been som issues with "older" versions of got so an update to a never version might fix this.

await download('SOME_URL', 'SOME_DEST', {retries: 0, timeout: 10000});

edgarinvillegas commented 3 years ago

The same happens to me. The workaround I'm using is:

const pTimeout = require('p-timeout')
await pTimeout(download('SOME_URL', 'SOME_DEST'), 10000)