Merge branch 'grpc-js_proxy_support' of github.com:murgatroid99/grpc-node into grpc-js_proxy_support

This commit is contained in:
murgatroid99 2020-02-05 11:34:51 -08:00
commit f41daae844

View File

@ -338,10 +338,10 @@ export function parseTarget(target: string): dnsUrl | null {
const match = IPV4_REGEX.exec(target) ?? IPV6_REGEX.exec(target) ?? IPV6_BRACKET_REGEX.exec(target) ?? DNS_REGEX.exec(target)
if (match) {
return {
host: match[0],
port: match[1] ?? undefined
host: match[1],
port: match[2] ?? undefined
};
} else {
return null;
}
}
}