Make axfr example much more robust

This commit is contained in:
Miek Gieben 2011-12-20 13:05:42 +01:00
parent d6b1d886d1
commit c153bcfa22

View File

@ -23,7 +23,10 @@ func main() {
}
if err := client.XfrReceive(m, *nameserver); err == nil {
for r := range client.ReplyChan {
if r.Error != nil {
if r.Error == dns.ErrXfrLast {
fmt.Printf("%v\n", r.Reply)
}
break
}
fmt.Printf("%v\n", r.Reply)