amphp / dns

Async DNS resolution for PHP based on Amp.
https://amphp.org/dns
MIT License
157 stars 32 forks source link

Subtype 'Too many redirects' DnsException #90

Closed psafarov closed 1 year ago

psafarov commented 5 years ago

https://github.com/amphp/dns/blob/493d014b58c14e29303a145b0be4cf272aa6644f/lib/Rfc1035StubResolver.php#L219

It would be very nice to differentiate this type of error. In my situation this difference is important as other DnsException throws are usually temporary, so the script can be rerun successfully whereas 'Too many redirections' error tend to be permanent (e.g. if there is a cyclic aliasing)

kelunik commented 4 years ago

Do you want to provide a PR?