Commit 25367a43 authored by Pat Moroney's avatar Pat Moroney

remove the defer

parent 53d9bff7
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment