Merge pull request #2179 from murgatroid99/grpc-js_outlier_detection_wrapper_fix

grpc-js: Implement getConnectivityState in subchannel wrapper
This commit is contained in:
Michael Lumish 2022-08-04 14:38:04 -07:00 committed by GitHub
commit 326dd96fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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.