Skip to content
forked from nodejs/node

Commit

Permalink
dns: name generated functions
Browse files Browse the repository at this point in the history
PR-URL: nodejs#14518
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
addaleax committed Aug 1, 2017
1 parent 732658e commit 0f5dabe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class Resolver {
}

function resolver(bindingName) {
return function query(name, /* options, */ callback) {
function query(name, /* options, */ callback) {
var options;
if (arguments.length > 2) {
options = callback;
Expand All @@ -277,7 +277,9 @@ function resolver(bindingName) {
var err = this._handle[bindingName](req, name);
if (err) throw errnoException(err, bindingName);
return req;
};
}
Object.defineProperty(query, 'name', { value: bindingName });
return query;
}

var resolveMap = Object.create(null);
Expand Down

0 comments on commit 0f5dabe

Please sign in to comment.