Add note on return value of dns.resolve

This commit is contained in:
Girish Ramakrishnan
2018-02-08 14:10:53 -08:00
parent 4d92aea2f3
commit 0927c8161c

View File

@@ -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);
});
}