fix: fix reload causing secondary plugin goroutine to leak. (#7694)

Signed-off-by: wenxuan70 <t736660416@gmail.com>
This commit is contained in:
wenxuan70
2025-11-20 09:17:57 +08:00
committed by GitHub
parent 9989ac5060
commit e56971b253
2 changed files with 20 additions and 2 deletions

View File

@@ -107,7 +107,7 @@ func less(a, b uint32) bool {
// and uses the SOA parameters. Every refresh it will check for a new SOA number. If that fails (for all
// server) it will retry every retry interval. If the zone failed to transfer before the expire, the zone
// will be marked expired.
func (z *Zone) Update() error {
func (z *Zone) Update(updateShutdown chan bool) error {
// If we don't have a SOA, we don't have a zone, wait for it to appear.
for z.SOA == nil {
time.Sleep(1 * time.Second)
@@ -183,6 +183,12 @@ Restart:
retryTicker.Stop()
expireTicker.Stop()
goto Restart
case <-updateShutdown:
refreshTicker.Stop()
retryTicker.Stop()
expireTicker.Stop()
return nil
}
}
}