Skip to content

Commit

Permalink
fix max execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
fcavallarin committed Oct 28, 2019
1 parent 80a6308 commit 6067d22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion domdig.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ async function crawlAndFuzz(targetUrl, payload, options){
}
}


try{
// workaround, fix it in htcrawl
let timeo = setTimeout(function(){
crawler.stop();
}, options.maxExecTime);

await crawler.start();
clearTimeout(timeo);
} catch(e){
console.log(`Error ${e}`);
process.exit(-4);
Expand Down

0 comments on commit 6067d22

Please sign in to comment.