mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
Do the notifies only once during startup
This commit is contained in:
@@ -20,8 +20,11 @@ func File(c *Controller) (middleware.Middleware, error) {
|
||||
for _, n := range zones.Names {
|
||||
if len(zones.Z[n].TransferTo) > 0 {
|
||||
c.Startup = append(c.Startup, func() error {
|
||||
zones.Z[n].Notify()
|
||||
return err
|
||||
zones.Z[n].StartupOnce.Do(func() {
|
||||
if len(zones.Z[n].TransferTo) > 0 {
|
||||
zones.Z[n].Notify()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user