AnyEvent::DNS doesn't try other servers on SERVFAIL

Henrik Pauli henrik.pauli at gmail.com
Fri May 29 15:33:23 CEST 2026


Hi,

With one of the default servers (80.80.81.81) occasionally misbehaving, we
saw that AnyEvent::DNS only retries on timeouts, but not on errors that
could still result in a different response when asking other nameservers in
the list.  Such as SERVFAIL or REFUSED.

Maybe an elsif around line 1285 in _exec, something like:

```
} elsif ($res->{rc} eq "servfail" || $res->{rc} eq "refused") {
   # server error, try next nameserver
   &$do_retry;
} else {
   # success
```

Though I'm not sure if this will break anything terribly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20260529/896a9711/attachment.htm>


More information about the anyevent mailing list