feat: add browser service shutdown to server lifecycle

This commit is contained in:
SnapOtter
2026-06-06 21:45:38 +08:00
parent d9959d6686
commit 5760d6723f
+8
View File
@@ -385,6 +385,14 @@ async function shutdown(signal: string) {
// AI package may not be available // AI package may not be available
} }
try {
const { shutdownBrowser } = await import("./lib/browser-service.js");
await shutdownBrowser();
console.log("Browser service shut down");
} catch {
// Browser service may not have been initialized
}
try { try {
await shutdownAnalytics(); await shutdownAnalytics();
console.log("Analytics flushed"); console.log("Analytics flushed");