remove the defer

This commit is contained in:
Pat Moroney
2017-10-24 14:28:41 -06:00
parent 53d9bff707
commit 25367a4329

View File

@@ -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
} }