You need to sign in or sign up before continuing.
Commit fb328698 authored by Miek Gieben's avatar Miek Gieben

Do the notifies only once during startup

parent 885e6e82
......@@ -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].StartupOnce.Do(func() {
if len(zones.Z[n].TransferTo) > 0 {
zones.Z[n].Notify()
return err
}
})
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment