Skip to content

Commit

Permalink
Merge pull request #45 from netbootxyz/error_handling
Browse files Browse the repository at this point in the history
Add a catch for errors
  • Loading branch information
antonym authored Oct 21, 2023
2 parents b8544ca + b1c7853 commit d58d780
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ async function downloader(downloads){
io.emit('dldata', url, [+i + 1,total], stats);
}
});


await dl.start().catch(error => {
console.error('Download failed:', error);
});

await dl.start();
if ( ! url.includes('s3.amazonaws.com')){
// Part 2 if exists repeat
Expand Down

0 comments on commit d58d780

Please sign in to comment.