mirror of
https://github.com/coredns/coredns.git
synced 2026-10-09 03:55:21 -04:00
plugin/azure: allow startup with unavailable zones (#8524)
Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
This commit is contained in:
@@ -45,16 +45,17 @@ func setup(c *caddy.Controller) error {
|
||||
return plugin.Error("azure", err)
|
||||
}
|
||||
h.Fall = fall
|
||||
if err := h.Run(ctx); err != nil {
|
||||
cancel()
|
||||
return plugin.Error("azure", err)
|
||||
}
|
||||
|
||||
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
|
||||
h.Next = next
|
||||
return h
|
||||
})
|
||||
c.OnShutdown(func() error { cancel(); return nil })
|
||||
c.OnStartup(func() error { return h.Run(ctx) })
|
||||
c.OnShutdown(func() error {
|
||||
cancel()
|
||||
h.updates.Wait()
|
||||
return nil
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user