mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
remove the defer
This commit is contained in:
@@ -78,8 +78,8 @@ func (h *Hostsfile) ReadHosts() {
|
|||||||
if err == nil && h.mtime.Equal(stat.ModTime()) && h.size == stat.Size() {
|
if err == nil && h.mtime.Equal(stat.ModTime()) && h.size == stat.Size() {
|
||||||
h.RUnlock()
|
h.RUnlock()
|
||||||
h.Lock()
|
h.Lock()
|
||||||
defer h.Unlock()
|
|
||||||
h.expire = now.Add(cacheMaxAge)
|
h.expire = now.Add(cacheMaxAge)
|
||||||
|
h.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user