aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers/crawlerWorker.ts
diff options
context:
space:
mode:
authorChang-Yen Tseng <10328757+Summon528@users.noreply.github.com>2025-04-16 07:09:46 -0700
committerGitHub <noreply@github.com>2025-04-16 15:09:46 +0100
commitdd990b51f3f85f70298a9b437b16ee7bbb406d24 (patch)
tree4effc5795d53a8444a32610c19a2e1d15779127e /apps/workers/crawlerWorker.ts
parent209573ee4137b605f941f39f04cb195492e6659d (diff)
downloadkarakeep-dd990b51f3f85f70298a9b437b16ee7bbb406d24.tar.zst
fix(workers): Close browser if connect on demand (#1151)
Diffstat (limited to 'apps/workers/crawlerWorker.ts')
-rw-r--r--apps/workers/crawlerWorker.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/workers/crawlerWorker.ts b/apps/workers/crawlerWorker.ts
index c96ca636..0bfb109c 100644
--- a/apps/workers/crawlerWorker.ts
+++ b/apps/workers/crawlerWorker.ts
@@ -358,6 +358,9 @@ async function crawlPage(
};
} finally {
await context.close();
+ if (serverConfig.crawler.browserConnectOnDemand) {
+ await browser.close();
+ }
}
}