aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/lookup.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/file/lookup.go')
-rw-r--r--plugin/file/lookup.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/file/lookup.go b/plugin/file/lookup.go
index 52b78114c..3a72a6163 100644
--- a/plugin/file/lookup.go
+++ b/plugin/file/lookup.go
@@ -44,7 +44,9 @@ func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string)
// If z is a secondary zone we might not have transferred it, meaning we have
// all zone context setup, except the actual record. This means (for one thing) the apex
// is empty and we don't have a SOA record.
+ z.apexMu.RLock()
soa := z.Apex.SOA
+ z.apexMu.RUnlock()
if soa == nil {
return nil, nil, nil, ServerFailure
}