mirror of https://github.com/grpc/grpc-java.git
xds:fix cdsLoadBalancer2 childLb shutdown (#7971)
This commit is contained in:
parent
be6192e82a
commit
71c4ef730e
|
|
@ -129,6 +129,9 @@ final class CdsLoadBalancer2 extends LoadBalancer {
|
|||
|
||||
private void shutdown() {
|
||||
root.shutdown();
|
||||
if (childLb != null) {
|
||||
childLb.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
private void handleClusterDiscovered() {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ public class CdsLoadBalancer2Test {
|
|||
loadBalancer.shutdown();
|
||||
assertThat(xdsClient.watchers).isEmpty();
|
||||
assertThat(xdsClientRefs).isEqualTo(0);
|
||||
assertThat(childBalancers).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue