kill browser when internal exception is caught in core auto chat flow

This commit is contained in:
geekgeekrun
2024-03-17 15:08:47 +08:00
parent 6a6169ec11
commit 6649691025
@@ -68,6 +68,7 @@ const main = async () => {
break break
} }
} }
closeBrowserWindow?.()
console.error(err) console.error(err)
console.log(`[Run core main] An internal is caught, and browser will be restarted in ${rerunInterval}ms.`) console.log(`[Run core main] An internal is caught, and browser will be restarted in ${rerunInterval}ms.`)
await sleep(rerunInterval) await sleep(rerunInterval)