Skip to content

Commit e2a7382

Browse files
committed
Reinstantiate delegate after shutdown.
1 parent f6afb63 commit e2a7382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xds/src/main/java/io/grpc/xds/CdsLoadBalancer2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ public void handleNameResolutionError(Status error) {
178178
public void shutdown() {
179179
logger.log(XdsLogLevel.INFO, "Shutdown");
180180
delegate.shutdown();
181+
delegate = new GracefulSwitchLoadBalancer(helper);
181182
if (clusterSubscription != null) {
182183
clusterSubscription.close();
183184
clusterSubscription = null;
184185
}
185-
delegate = new GracefulSwitchLoadBalancer(helper);
186186
}
187187

188188
@CheckReturnValue // don't forget to return up the stack after the fail call

0 commit comments

Comments
 (0)