mirror of https://github.com/grpc/grpc-node.git
Fix Channel#getConnectivityState API and behavior
This commit is contained in:
parent
644caf3b05
commit
7f62173246
|
@ -304,8 +304,12 @@ export class ChannelImplementation implements Channel {
|
|||
return this.target;
|
||||
}
|
||||
|
||||
getConnectivityState() {
|
||||
return this.connectivityState;
|
||||
getConnectivityState(tryToConnect: boolean) {
|
||||
const connectivityState = this.connectivityState;
|
||||
if (tryToConnect) {
|
||||
this.resolvingLoadBalancer.exitIdle();
|
||||
}
|
||||
return connectivityState;
|
||||
}
|
||||
|
||||
watchConnectivityState(
|
||||
|
|
Loading…
Reference in New Issue