mirror of https://github.com/grpc/grpc-node.git
Fix hardcoded IPv6 localhost address
This commit is contained in:
parent
b7656e0644
commit
3f7d640e9e
|
@ -181,7 +181,7 @@ class DnsResolver implements Resolver {
|
||||||
}
|
}
|
||||||
if (this.dnsHostname === 'localhost') {
|
if (this.dnsHostname === 'localhost') {
|
||||||
if (semver.satisfies(process.version, IPV6_SUPPORT_RANGE)) {
|
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 {
|
} else {
|
||||||
this.ipResult = [`127.0.0.1:${this.port}`];
|
this.ipResult = [`127.0.0.1:${this.port}`];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue