diff --git a/index.js b/index.js index aa1054e..e928178 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,6 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro const userIp = clientIp.getAddress(); if (!userIp) log('warn', `Your IP address is missing! Received: ${userIp}`); - const reportedIPs = readReportedIPs(); let cycleImageSkippedCount = 0, cycleProcessedCount = 0, cycleReportedCount = 0, cycleSkippedCount = 0; const cycleErrorCounts = { blocked: 0, noResponse: 0, otherErrors: 0 }; let imageRequestLogged = false; @@ -130,6 +129,7 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro cycleProcessedCount++; const ip = event.clientIP; + const reportedIPs = readReportedIPs(); const { recentlyReported, timeDifference } = isIPReportedRecently(event.rayName, ip, reportedIPs); if (recentlyReported) { const hoursAgo = Math.floor(timeDifference / (1000 * 60 * 60));