diff --git a/src/ts/lib/Tools.ts b/src/ts/lib/Tools.ts index 7174d3b..77ada55 100644 --- a/src/ts/lib/Tools.ts +++ b/src/ts/lib/Tools.ts @@ -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'); }); });