Fixes #3445: Close timers after resolving/erroring the `dns.*` promises

main
Sergii Bondarenko 4 years ago
parent 33fbfb9a3c
commit 07a6e2b5fe
No known key found for this signature in database
GPG Key ID: 242150A50CD96A36

@ -637,17 +637,16 @@ class Site {
// DNS // DNS
if (!this.dns.length) { if (!this.dns.length) {
const records = {} const records = {}
const resolve = async (func, hostname) => { const resolve = async (func, hostname) => {
try { return this.promiseTimeout(
return await this.promiseTimeout(func(hostname)) func(hostname).catch((error) => {
} catch (error) { if (error.code !== 'ENODATA') {
if (error.code !== 'ENODATA') { this.error(error)
this.error(error) }
}
return [] return []
} })
)
} }
const domain = url.hostname.replace(/^www\./, '') const domain = url.hostname.replace(/^www\./, '')

Loading…
Cancel
Save