Compare commits

...

2 Commits

Author SHA1 Message Date
65d801b248 chore: remove one sigint message 2025-04-12 21:46:49 +07:00
be8a9650a1 fix: await keepAlive
I forgot...
2025-04-12 21:46:26 +07:00
2 changed files with 1 additions and 5 deletions

View File

@ -65,10 +65,6 @@ if (config.proxy.mode === "reflect4") {
logger.info("All proxies spawned successfully."); logger.info("All proxies spawned successfully.");
} }
process.on("SIGINT", () => {
logger.info("Received SIGINT. Closing browser...");
});
process.on("SIGINT", async () => { process.on("SIGINT", async () => {
logger.info("Received SIGINT. Closing browser..."); logger.info("Received SIGINT. Closing browser...");
for (const context of browser.contexts()) { for (const context of browser.contexts()) {

View File

@ -26,7 +26,7 @@ async function spawn(context: BrowserContext, targetUrl: string) {
await targetInput.press("Enter"); await targetInput.press("Enter");
// Keep-alive the page open for 5 minutes then refresh // Keep-alive the page open for 5 minutes then refresh
if (targetUrl.startsWith("https://www.twitch.tv/")) { if (targetUrl.startsWith("https://www.twitch.tv/")) {
twitch.keepAlive(page, spawnId); await twitch.keepAlive(page, spawnId);
} else { } else {
logger.warn(`[${spawnId}] Unsupported URL: ${targetUrl}`); logger.warn(`[${spawnId}] Unsupported URL: ${targetUrl}`);
logger.warn(`[${spawnId}] Will try to keep alive, but no guarantees`); logger.warn(`[${spawnId}] Will try to keep alive, but no guarantees`);