Fix telemetry breaking if ENOTFOUND

This commit is contained in:
Maroxy 2021-12-11 22:14:46 +01:00
parent 99cfdf37d3
commit 3dc3aa3d33
No known key found for this signature in database
GPG key ID: F4B27EADB21E3021

View file

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