MCPcopy Index your code
hub / github.com/nodejs/node / onresolve

Function onresolve

lib/internal/dns/promises.js:294–308  ·  view source on GitHub ↗
(err, result, ttls)

Source from the content-addressed store, hash-verified

292
293
294function onresolve(err, result, ttls) {
295 if (err) {
296 this.reject(new DNSException(err, this.bindingName, this.hostname));
297 return;
298 }
299
300 if (ttls && this.ttl)
301 result = ArrayPrototypeMap(
302 result, (address, index) => ({ address, ttl: ttls[index] }));
303
304 this.resolve(result);
305 if (this[kPerfHooksDnsLookupResolveContext] && hasObserver('dns')) {
306 stopPerf(this, kPerfHooksDnsLookupResolveContext, { detail: { result } });
307 }
308}
309
310function createResolverPromise(resolver, bindingName, hostname, ttl) {
311 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 4

hasObserverFunction · 0.85
stopPerfFunction · 0.85
rejectMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…