dnsexit2: Don't skip remaining hosts on connect error or non-2xx

A non-2xx status code might be host-specific, so ddclient should
continue with the next host.  We could skip the remaining hosts if
there is a connection failure, but it doesn't hurt to retry.
This commit is contained in:
Richard Hansen 2024-05-31 19:03:04 -04:00
parent 216741c9ce
commit 11d0c84639

View file

@ -4217,7 +4217,7 @@ sub nic_dnsexit2_update {
); );
unless ($reply && header_ok($h, $reply)) { unless ($reply && header_ok($h, $reply)) {
failed("updating %s: Could not connect to %s", $h, $url); failed("updating %s: Could not connect to %s", $h, $url);
last; next;
}; };
debug("%s", $reply); debug("%s", $reply);
(my $http_status) = ($reply =~ m%^s*HTTP/.*\s+(\d+)%i); (my $http_status) = ($reply =~ m%^s*HTTP/.*\s+(\d+)%i);