From cb856ccee1e431713d5aab33161720a6fcc2d33a Mon Sep 17 00:00:00 2001 From: Sefinek Date: Fri, 21 Mar 2025 10:29:37 +0100 Subject: [PATCH] Last fixes --- services/ipFetcher.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/services/ipFetcher.js b/services/ipFetcher.js index a361e5d..092ad88 100644 --- a/services/ipFetcher.js +++ b/services/ipFetcher.js @@ -8,7 +8,6 @@ const { MAIN, CYCLES } = require('../config.js').CONFIG; const ipAddresses = new Set(); let ipv6ErrorCount = 0, ipv6ErrorLogged = false; -const IPv6Failed = 'It looks like your ISP hasn\'t assigned you any IPv6 address. I won\'t attempt to fetch it again.'; const fetchIPAddress = async family => { if (family === 6 && (ipv6ErrorLogged || !MAIN.IPv6_SUPPORT)) return; @@ -22,11 +21,7 @@ const fetchIPAddress = async family => { ipAddresses.add(data.message); if (family === 6) { - if (ipv6ErrorCount > 0) { - const IPv6Success = `Uh, it looks like IPv6 has started working! It only succeeded after ${ipv6ErrorCount} attempts.`; - log(0, IPv6Success); - } - + if (ipv6ErrorCount > 0) log(0, `Uh, it looks like IPv6 has started working! It only succeeded after ${ipv6ErrorCount} attempts.`); ipv6ErrorCount = 0; } } else { @@ -40,7 +35,7 @@ const fetchIPAddress = async family => { if (ipv6ErrorCount >= 6 && !ipv6ErrorLogged) { ipv6ErrorLogged = true; - log(0, IPv6Failed); + log(0, 'It looks like your ISP hasn\'t assigned you any IPv6 address. I won\'t attempt to fetch it again.'); } else { await new Promise(resolve => setTimeout(resolve, 4000)); await fetchIPAddress(6);