plugin/file: z.Expired needs be read under a rlock (#3056)

Read lock before reading the Expired field of a zone.

Fixes: #3053

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2019-07-27 15:06:50 +00:00
committed by Yong Tang
parent 7a3371d740
commit 92a636df53
2 changed files with 5 additions and 2 deletions

View File

@@ -22,13 +22,13 @@ type Zone struct {
file string
*tree.Tree
Apex
Expired *bool
sync.RWMutex
TransferTo []string
StartupOnce sync.Once
TransferFrom []string
Expired *bool
ReloadInterval time.Duration
reloadShutdown chan bool