Skip to content

Commit

Permalink
Update for no endpoint scene
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Jan 23, 2025
1 parent f8a7e10 commit 7d46b24
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses) {

@Override
public void handleNameResolutionError(Status error) {
helper.updateBalancingState(TRANSIENT_FAILURE, new LiveSubchannelPicker(PickResult.withError(error)));
// helper.updateBalancingState(TRANSIENT_FAILURE, new LiveSubchannelPicker(PickResult.withError(error)));
handleResolvedAddresses(null);
}

@Override
Expand Down Expand Up @@ -123,6 +124,9 @@ protected static String getServiceName(Helper helper) {
*/
private Set<EquivalentAddressGroup> deDup(ResolvedAddresses resolvedAddresses) {
Set<EquivalentAddressGroup> result = new HashSet<>();
if (resolvedAddresses == null) {
return result;
}
resolvedAddresses.getAddresses().forEach(addressGroup -> {
Attributes attributes = addressGroup.getAttributes();
addressGroup.getAddresses().forEach(address -> result.add(new EquivalentAddressGroup(address, attributes)));
Expand Down

0 comments on commit 7d46b24

Please sign in to comment.