diff --git a/core/src/main/java/io/grpc/util/OutlierDetectionLoadBalancer.java b/core/src/main/java/io/grpc/util/OutlierDetectionLoadBalancer.java index 66380b9631b..68fba91cda6 100644 --- a/core/src/main/java/io/grpc/util/OutlierDetectionLoadBalancer.java +++ b/core/src/main/java/io/grpc/util/OutlierDetectionLoadBalancer.java @@ -204,7 +204,7 @@ public Subchannel createSubchannel(CreateSubchannelArgs args) { // If the subchannel is associated with a single address that is also already in the map // the subchannel will be added to the map and be included in outlier detection. - List addressGroups = subchannel.getAllAddresses(); + List addressGroups = args.getAddresses(); if (hasSingleAddress(addressGroups) && trackerMap.containsKey(addressGroups.get(0).getAddresses().get(0))) { AddressTracker tracker = trackerMap.get(addressGroups.get(0).getAddresses().get(0));