aboutsummaryrefslogtreecommitdiff
path: root/core/restart_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/restart_windows.go')
-rw-r--r--core/restart_windows.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/restart_windows.go b/core/restart_windows.go
index c2a4f557a..8a0805a19 100644
--- a/core/restart_windows.go
+++ b/core/restart_windows.go
@@ -2,15 +2,15 @@ package core
import "log"
-// Restart restarts Caddy forcefully using newCaddyfile,
-// or, if nil, the current/existing Caddyfile is reused.
-func Restart(newCaddyfile Input) error {
+// Restart restarts CoreDNS forcefully using newCorefile,
+// or, if nil, the current/existing Corefile is reused.
+func Restart(newCorefile Input) error {
log.Println("[INFO] Restarting")
- if newCaddyfile == nil {
- caddyfileMu.Lock()
- newCaddyfile = caddyfile
- caddyfileMu.Unlock()
+ if newCorefile == nil {
+ corefileMu.Lock()
+ newCorefile = corefile
+ corefileMu.Unlock()
}
wg.Add(1) // barrier so Wait() doesn't unblock
@@ -20,7 +20,7 @@ func Restart(newCaddyfile Input) error {
return err
}
- err = Start(newCaddyfile)
+ err = Start(newCorefile)
if err != nil {
return err
}