mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2179 from murgatroid99/grpc-js_outlier_detection_wrapper_fix
grpc-js: Implement getConnectivityState in subchannel wrapper
This commit is contained in:
commit
326dd96fe4
|
@ -215,6 +215,14 @@ class OutlierDetectionSubchannelWrapper extends BaseSubchannelWrapper implements
|
|||
});
|
||||
}
|
||||
|
||||
getConnectivityState(): connectivityState {
|
||||
if (this.ejected) {
|
||||
return ConnectivityState.TRANSIENT_FAILURE;
|
||||
} else {
|
||||
return this.childSubchannelState;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a listener function to be called whenever the wrapper's
|
||||
* connectivity state changes.
|
||||
|
|
Loading…
Reference in New Issue