mirror of
https://github.com/danog/dns.git
synced 2025-01-23 05:51:11 +01:00
Fix BasicResolver::resolve to break redirect loop
Previously we queried domains usually five times (max redirects). It didn't have much impact, because these records were usually cached and immediately returned again, but this resulted in the TTL always being NULL due to cached records being returned.
This commit is contained in:
parent
dd6e3c294a
commit
1a41089d84
@ -125,6 +125,8 @@ final class BasicResolver implements Resolver {
|
||||
]);
|
||||
|
||||
$records = \array_merge(...$records);
|
||||
|
||||
break; // Break redirect loop, otherwise we query the same records 5 times
|
||||
} catch (MultiReasonException $e) {
|
||||
foreach ($e->getReasons() as $reason) {
|
||||
if ($reason instanceof NoRecordException) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user