mirror of
https://github.com/miekg/dns.git
synced 2025-12-14 16:21:00 +01:00
snapshot
This commit is contained in:
parent
5cf4522eed
commit
51e13a15c9
@ -537,11 +537,16 @@ func (w *reply) writeClient(p []byte) (n int, err error) {
|
||||
i += j
|
||||
}
|
||||
n = i
|
||||
// TODO(mg): is the loop correct?
|
||||
}
|
||||
case "", "udp", "udp4", "udp6":
|
||||
for a := 0; a < attempts; a++ {
|
||||
println("DOING", a)
|
||||
setTimeouts(w)
|
||||
n, err = w.conn.(*net.UDPConn).Write(p)
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
if e, ok := err.(net.Error); ok && e.Timeout() {
|
||||
continue
|
||||
|
||||
@ -31,6 +31,7 @@ func serve(w dns.ResponseWriter, r *dns.Msg, c *Cache) {
|
||||
c.Insert(p)
|
||||
return
|
||||
} else {
|
||||
log.Printf("fks-shield: failed to get answer " + e.Error())
|
||||
// w.Write(SERFVAIL)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user