mirror of https://github.com/grpc/grpc-node.git
Undo changes.
This commit is contained in:
parent
08350ec0ef
commit
6a99983ed1
|
@ -268,13 +268,7 @@ class DnsResolver implements Resolver {
|
||||||
* @param target
|
* @param target
|
||||||
*/
|
*/
|
||||||
static getDefaultAuthority(target: GrpcUri): string {
|
static getDefaultAuthority(target: GrpcUri): string {
|
||||||
const hostPort = uri_parser_1.splitHostPort(target.path);
|
return target.path;
|
||||||
if (hostPort !== null) {
|
|
||||||
return hostPort.host;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new Error(`Failed to parse target ${uri_parser_1.uriToString(target)}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue