(err, result, ttls)
| 292 | |
| 293 | |
| 294 | function 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 | |
| 310 | function createResolverPromise(resolver, bindingName, hostname, ttl) { |
| 311 | return new Promise((resolve, reject) => { |
nothing calls this directly
no test coverage detected
searching dependent graphs…