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;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getConnectivityState() {
 | 
			
		||||
    return this.connectivityState;
 | 
			
		||||
  getConnectivityState(tryToConnect: boolean) {
 | 
			
		||||
    const connectivityState = this.connectivityState;
 | 
			
		||||
    if (tryToConnect) {
 | 
			
		||||
      this.resolvingLoadBalancer.exitIdle();
 | 
			
		||||
    }
 | 
			
		||||
    return connectivityState;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  watchConnectivityState(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue