Skip to content

Commit

Permalink
ensure 'finalExit' is set if crawl is fully done!
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Jan 18, 2025
1 parent 7b5ba97 commit 3539755
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1582,8 +1582,11 @@ self.__bx_behaviors.selectMainBehavior();

await this.writeStats();

// if crawl has been stopped, mark as final exit for post-crawl tasks
if (await this.crawlState.isCrawlStopped()) {
// if crawl has been stopped or finished, mark as final exit for post-crawl tasks
if (
(await this.crawlState.isCrawlStopped()) ||
(await this.crawlState.isFinished())
) {
this.finalExit = true;
}

Expand Down

0 comments on commit 3539755

Please sign in to comment.