Merge branch 'marie/enotfound' into 'main'

Fix telemetry breaking if ENOTFOUND

See merge request KRypt0n_/an-anime-game-launcher!11
This commit is contained in:
Observer KRypt0n_ 2021-12-11 21:17:48 +00:00
commit c000cd4e0e

View file

@ -113,9 +113,8 @@ export default class Tools
dns.lookup(uri, (error: any, address: string, family: any) => { dns.lookup(uri, (error: any, address: string, family: any) => {
// console.log(`${uri} -> ${address}`); // console.log(`${uri} -> ${address}`);
if (error) if (error.toString().startsWith('Error: getaddrinfo ENOTFOUND')) resolve(true);
reject(error); else if (error) reject(error);
else resolve(address == '0.0.0.0'); else resolve(address == '0.0.0.0');
}); });
}); });