diff --git a/src/native-dns.js b/src/native-dns.js index 28ac540dd..d65c7e203 100644 --- a/src/native-dns.js +++ b/src/native-dns.js @@ -27,6 +27,9 @@ function resolve(hostname, rrtype, options, callback) { resolver.resolve(hostname, rrtype, function (error, result) { clearTimeout(timerId); + // result is an empty array if there was no error but there is no record. when you query a random + // domain, it errors with ENOTFOUND. But if you query an existing domain (A record) but with different + // type (CNAME) it is not an error and empty array callback(error, result); }); }