Fix hardcoded IPv6 localhost address

This commit is contained in:
murgatroid99 2019-09-03 11:05:54 -07:00
parent b7656e0644
commit 3f7d640e9e
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class DnsResolver implements Resolver {
}
if (this.dnsHostname === 'localhost') {
if (semver.satisfies(process.version, IPV6_SUPPORT_RANGE)) {
this.ipResult = [`::1:${this.port}`, `127.0.0.1:${this.port}`];
this.ipResult = [`[::1]:${this.port}`, `127.0.0.1:${this.port}`];
} else {
this.ipResult = [`127.0.0.1:${this.port}`];
}