mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1349 from murgatroid99/grpc-js_authority_no_port
grpc-js: Don't include the port in :authority
This commit is contained in:
commit
cb39daede2
|
@ -298,16 +298,10 @@ class DnsResolver implements Resolver {
|
|||
IPV6_REGEX.exec(target) ||
|
||||
IPV6_BRACKET_REGEX.exec(target);
|
||||
if (ipMatch) {
|
||||
if (ipMatch[2]) {
|
||||
return ipMatch[1] + ':' + ipMatch[2];
|
||||
}
|
||||
return ipMatch[1];
|
||||
}
|
||||
const dnsMatch = DNS_REGEX.exec(target);
|
||||
if (dnsMatch) {
|
||||
if (dnsMatch[2]) {
|
||||
return dnsMatch[1] + ':' + dnsMatch[2];
|
||||
}
|
||||
return dnsMatch[1];
|
||||
}
|
||||
throw new Error(`Failed to parse target ${target}`);
|
||||
|
|
Loading…
Reference in New Issue