diff --git a/src/ts/lib/Tools.ts b/src/ts/lib/Tools.ts index 77ada55..395628c 100644 --- a/src/ts/lib/Tools.ts +++ b/src/ts/lib/Tools.ts @@ -113,8 +113,14 @@ export default class Tools dns.lookup(uri, (error: any, address: string, family: any) => { // console.log(`${uri} -> ${address}`); - if (error.toString().startsWith('Error: getaddrinfo ENOTFOUND')) resolve(true); - else if (error) reject(error); + if (error) + { + if (error.toString().startsWith('Error: getaddrinfo ENOTFOUND')) + resolve(true); + + else reject(error); + } + else resolve(address == '0.0.0.0'); }); });