From 25367a43296bf681c984121ae7f40e08f32508a8 Mon Sep 17 00:00:00 2001 From: Pat Moroney Date: Tue, 24 Oct 2017 14:28:41 -0600 Subject: [PATCH] remove the defer --- plugin/hosts/hostsfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }