fix: prevent SIGTERM/reload deadlock (#7562)

This commit is contained in:
Ville Vesilehto
2025-09-19 14:01:53 +03:00
committed by GitHub
parent 5532ba8484
commit 6ec327836b
6 changed files with 171 additions and 24 deletions

View File

@@ -20,7 +20,7 @@ func init() { plugin.Register("reload", setup) }
// channel for QUIT is never changed in purpose.
// WARNING: this data may be unsync after an invalid attempt of reload Corefile.
var (
r = reload{dur: defaultInterval, u: unused, quit: make(chan bool)}
r = reload{dur: defaultInterval, u: unused, quit: make(chan bool, 1)}
once, shutOnce sync.Once
)