(err, addresses)
| 84 | } = require('internal/perf/observe'); |
| 85 | |
| 86 | function onlookup(err, addresses) { |
| 87 | if (err) { |
| 88 | this.reject(new DNSException(err, 'getaddrinfo', this.hostname)); |
| 89 | return; |
| 90 | } |
| 91 | |
| 92 | const family = this.family || isIP(addresses[0]); |
| 93 | this.resolve({ address: addresses[0], family }); |
| 94 | if (this[kPerfHooksDnsLookupContext] && hasObserver('dns')) { |
| 95 | stopPerf(this, kPerfHooksDnsLookupContext, { detail: { addresses } }); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | function onlookupall(err, addresses) { |
| 100 | if (err) { |
nothing calls this directly
no test coverage detected