mirror of https://github.com/grpc/grpc-node.git
Update subchannel.ts
This commit is contained in:
parent
6f3db6f4d8
commit
08350ec0ef
|
@ -467,11 +467,13 @@ export class Subchannel {
|
|||
* if a connection is successfully established through the proxy.
|
||||
* If the proxy is not used, these connectionOptions are discarded
|
||||
* anyway */
|
||||
connectionOptions.servername = getDefaultAuthority(
|
||||
const targetPath = getDefaultAuthority(
|
||||
parseUri(this.options['grpc.http_connect_target'] as string) ?? {
|
||||
path: 'localhost',
|
||||
}
|
||||
);
|
||||
const hostPort = splitHostPort(targetPath);
|
||||
connectionOptions.servername = (hostPort !== null) ? hostPort.host : targetPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue