File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
cmd/compute-domain-daemon Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ func IMEXDaemonUpdateLoopWithDNSNames(ctx context.Context, controller *Controlle
374374 klog .Infof ("shutdown: stop IMEXDaemonUpdateLoopWithDNSNames" )
375375 return nil
376376 case daemons := <- controller .GetDaemonInfoUpdateChan ():
377- updated , err := dnsNameManager .UpdateDNSNameMappings (daemons )
377+ oldCount := len ( dnsNameManager . ipToDNSName ) updated , err := dnsNameManager .UpdateDNSNameMappings (daemons )
378378 if err != nil {
379379 return fmt .Errorf ("failed to update DNS name => IP mappings: %w" , err )
380380 }
@@ -396,7 +396,7 @@ func IMEXDaemonUpdateLoopWithDNSNames(ctx context.Context, controller *Controlle
396396 // this also if the new set of IP addresses only strictly removes
397397 // addresses compared to the old set (then we don't need to force
398398 // the daemon to re-resolve & re-connect).
399- if ! updated || fresh {
399+ if ! updated || fresh || len ( dnsNameManager . ipToDNSName ) < oldCount {
400400 break
401401 }
402402
You can’t perform that action at this time.
0 commit comments