aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/hosts/hostsfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/hosts/hostsfile.go b/plugin/hosts/hostsfile.go
index 7280049db..dbbc283b2 100644
--- a/plugin/hosts/hostsfile.go
+++ b/plugin/hosts/hostsfile.go
@@ -78,8 +78,8 @@ func (h *Hostsfile) ReadHosts() {
if err == nil && h.mtime.Equal(stat.ModTime()) && h.size == stat.Size() {
h.RUnlock()
h.Lock()
- defer h.Unlock()
h.expire = now.Add(cacheMaxAge)
+ h.Unlock()
return
}