From 7a4b96e04ece39d073e050978c06e50a44b8b314 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 19 Jul 2024 19:26:08 -0400 Subject: [PATCH] easydns: Delete incorrect handling of `TOOSOON` error Before: * `$scale` was ignored causing it to set `wtime` to 5s in the future, which is too brief. Fortunately, `min-error-interval` applied which prevented overly aggressive retries. * The lack of call to `failed` meant that `$result` was not set to "FAILED" and thus `mail-failure` recipients were not emailed. Now `TOOSOON` is treated like any other error and will result in a retry after `min-error-interval` (default: 5m). --- ddclient.in | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ddclient.in b/ddclient.in index 39b367e..ec9c2eb 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4833,15 +4833,6 @@ sub nic_easydns_update { $config{$h}{'mtime'} = $now; success("$h: IPv4 address set to $ipv4") if $ipv4; success("$h: IPv6 address set to $ipv6") if $ipv6; - } elsif ($status =~ /TOOSOON/) { - ## make sure we wait at least a little - my ($wait, $units) = (5, 'm'); - my ($sec, $scale) = ($wait, 1); - ($scale, $units) = (1, 'seconds') if $units eq 's'; - ($scale, $units) = (60, 'minutes') if $units eq 'm'; - ($scale, $units) = (60*60, 'hours') if $units eq 'h'; - $config{$h}{'wtime'} = $now + $sec; - warning("$h: $status: wait $wait $units before further updates"); } elsif (exists $errors{$status}) { failed("$h: $status: $errors{$status}"); } else {