diff options
author | 2017-10-24 14:28:41 -0600 | |
---|---|---|
committer | 2017-10-24 14:28:41 -0600 | |
commit | 25367a43296bf681c984121ae7f40e08f32508a8 (patch) | |
tree | 3e2a872ec67f37013ab4613e1701b91bd6aa0ed6 | |
parent | 53d9bff707755ad11486fed5d99f21248bfa6381 (diff) | |
download | coredns-25367a43296bf681c984121ae7f40e08f32508a8.tar.gz coredns-25367a43296bf681c984121ae7f40e08f32508a8.tar.zst coredns-25367a43296bf681c984121ae7f40e08f32508a8.zip |
remove the defer
-rw-r--r-- | plugin/hosts/hostsfile.go | 2 |
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 } |