mirror of
https://github.com/coredns/coredns.git
synced 2026-10-27 04:35:43 -04:00
plugin/reload: hash the configuration executed by each instance (#8642)
Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/coredns/caddy"
|
||||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
clog "github.com/coredns/coredns/plugin/pkg/log"
|
||||
)
|
||||
@@ -76,6 +77,7 @@ func setup(c *caddy.Controller) error {
|
||||
|
||||
// prepare info for next onInstanceStartup event
|
||||
state := reloadForController(c)
|
||||
state.configHash = dnsserver.GetConfigHash(c)
|
||||
state.setInterval(i)
|
||||
state.setUsage(used)
|
||||
once.Do(func() {
|
||||
|
||||
Reference in New Issue
Block a user