aboutsummaryrefslogtreecommitdiffstats
path: root/dns/proxy.go
diff options
context:
space:
mode:
Diffstat (limited to 'dns/proxy.go')
-rw-r--r--dns/proxy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dns/proxy.go b/dns/proxy.go
index 060cb61..9daf552 100644
--- a/dns/proxy.go
+++ b/dns/proxy.go
@@ -143,8 +143,8 @@ func (p *Proxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
}
rr, err := p.client.Exchange(r)
if err == nil {
- p.cache.Set(key, rr)
p.writeMsg(w, rr, false)
+ p.cache.Set(key, rr)
} else {
p.logger.Printf("resolver(s) failed: %s", err)
dns.HandleFailed(w, r)