Add note on return value of dns.resolve
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user