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