Commit 1cf5e56d authored by Mark Nevill's avatar Mark Nevill

Propagate both message and error in proxy exchange.

parent 25c57ea3
......@@ -65,13 +65,9 @@ func (c *client) Exchange(m *dns.Msg, co net.Conn) (*dns.Msg, time.Duration, err
return ret, e
})
rtt := time.Since(start)
if err != nil {
return &dns.Msg{}, rtt, err
}
r1 := r.(dns.Msg)
return &r1, rtt, nil
rtt := time.Since(start)
return &r1, rtt, err
}
// exchange does *not* return a pointer to dns.Msg because that leads to buffer reuse when
......
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