From 4f6a532481155efb6fbf334039bf4df8cb04d8eb Mon Sep 17 00:00:00 2001 From: Sefinek Date: Sun, 18 Aug 2024 15:41:31 +0200 Subject: [PATCH] Update --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d6b5566..f7a0124 100644 --- a/index.js +++ b/index.js @@ -83,6 +83,12 @@ const reportIP = async (event, url, country, cycleErrorCounts) => { }; (async () => { + try { + process.send('ready'); + } catch (err) { + log('info', `Failed to send ready signal to parent process. ${err.message}`); + } + log('info', 'Starting IP reporting process...'); let cycleId = 1; @@ -117,7 +123,7 @@ const reportIP = async (event, url, country, cycleErrorCounts) => { if (!wasImageRequestLogged(ip, reportedIPs)) { logToCSV(event.rayName, ip, url, 'Skipped - Image Request', country); - if (imageRequestLogged) return; + if (imageRequestLogged) break; log('info', 'Skipping image requests in this cycle...'); imageRequestLogged = true; }