Compare commits
2 Commits
5189ed1472
...
65d801b248
| Author | SHA1 | Date | |
|---|---|---|---|
| 65d801b248 | |||
| be8a9650a1 |
@ -65,10 +65,6 @@ if (config.proxy.mode === "reflect4") {
|
||||
logger.info("All proxies spawned successfully.");
|
||||
}
|
||||
|
||||
process.on("SIGINT", () => {
|
||||
logger.info("Received SIGINT. Closing browser...");
|
||||
});
|
||||
|
||||
process.on("SIGINT", async () => {
|
||||
logger.info("Received SIGINT. Closing browser...");
|
||||
for (const context of browser.contexts()) {
|
||||
|
||||
@ -26,7 +26,7 @@ async function spawn(context: BrowserContext, targetUrl: string) {
|
||||
await targetInput.press("Enter");
|
||||
// Keep-alive the page open for 5 minutes then refresh
|
||||
if (targetUrl.startsWith("https://www.twitch.tv/")) {
|
||||
twitch.keepAlive(page, spawnId);
|
||||
await twitch.keepAlive(page, spawnId);
|
||||
} else {
|
||||
logger.warn(`[${spawnId}] Unsupported URL: ${targetUrl}`);
|
||||
logger.warn(`[${spawnId}] Will try to keep alive, but no guarantees`);
|
||||
|
||||
Reference in New Issue
Block a user