diff options
author | Christian Hesse <mail@eworm.de> | 2024-02-27 23:18:31 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-02-28 23:01:43 +0100 |
commit | 01d2c3ea7e3b00a3020705120d896fd6689fab1a (patch) | |
tree | 3ee489d5bd26f66a7c777e1520526d8ae3c326c3 | |
parent | 93bed1b081bb23624b988627d2db6e71d55e796a (diff) |
netwatch-notify: try another workaround
The last one did not make it... Perhaps the cache just needs
a moment to settle?
-rw-r--r-- | netwatch-notify.rsc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/netwatch-notify.rsc b/netwatch-notify.rsc index c8de7e1..5c6ae40 100644 --- a/netwatch-notify.rsc +++ b/netwatch-notify.rsc @@ -79,10 +79,8 @@ $ScriptLock $0; :if ([ $IsDNSResolving ] = true) do={ :do { :local Resolve [ :resolve ($HostInfo->"resolve") ]; - :if ($Resolve != $HostVal->"host" && \ - [ :len [ /ip/dns/cache/find where name=($HostInfo->"resolve") data=[ :tostr ($HostVal->"host") ] ttl>0s ] ] = 0) do={ - :delay 1500ms; - :resolve ($HostInfo->"resolve"); + :if ($Resolve != $HostVal->"host") do={ + :delay 100ms; :if ([ :len [ /ip/dns/cache/find where name=($HostInfo->"resolve") data=[ :tostr ($HostVal->"host") ] ] ] = 0) do={ $LogPrintExit2 info $0 ("Name '" . $HostInfo->"resolve" . [ $IfThenElse \ ($HostInfo->"resolve" != $HostInfo->"name") ("' for " . $Type . " '" . \ |