mirror of https://github.com/grpc/grpc-node.git
Deactivate targets that are not in new configs
This commit is contained in:
parent
807d7d510f
commit
4f38f1e92f
|
@ -299,6 +299,13 @@ export class WeightedTargetLoadBalancer implements LoadBalancer {
|
|||
target.updateAddressList(childAddressMap.get(targetName) ?? [], targetConfig, attributes);
|
||||
}
|
||||
|
||||
// Deactivate targets that are not in the new config
|
||||
for (const [targetName, target] of this.targets) {
|
||||
if (this.targetList.indexOf(targetName) < 0) {
|
||||
target.deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
this.updateState();
|
||||
}
|
||||
exitIdle(): void {
|
||||
|
|
Loading…
Reference in New Issue