mirror of
https://github.com/coredns/coredns.git
synced 2026-04-19 10:25:36 -04:00
[BUG] plugin/ready: fix Reset list of readiness plugins (#8035)
Signed-off-by: 杨军10092085 <yang.jun22@zte.com.cn>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
func init() { plugin.Register("ready", setup) }
|
||||
|
||||
func setup(c *caddy.Controller) error {
|
||||
plugins.Reset()
|
||||
addr, monType, err := parse(c)
|
||||
if err != nil {
|
||||
return plugin.Error("ready", err)
|
||||
@@ -32,7 +33,6 @@ func setup(c *caddy.Controller) error {
|
||||
c.OnRestartFailed(func() error { return uniqAddr.ForEach() })
|
||||
|
||||
c.OnStartup(func() error {
|
||||
plugins.Reset()
|
||||
for _, p := range dnsserver.GetConfig(c).Handlers() {
|
||||
if r, ok := p.(Readiness); ok {
|
||||
plugins.Append(r, p.Name())
|
||||
|
||||
Reference in New Issue
Block a user