netwatch-notify: attempt to update address with working resolver only

This commit is contained in:
Christian Hesse 2021-05-06 15:10:33 +02:00
parent cfb31e844c
commit 0b1bb0f2b2

View file

@ -12,6 +12,7 @@
:global NetwatchNotify;
:global DNSIsResolving;
:global IfThenElse;
:global LogPrintExit2;
:global ParseKeyValueStore;
@ -33,7 +34,7 @@
:set $Metric ($NetwatchNotify->$HostName);
}
:if ([ :typeof ($HostInfo->"resolve") ] = "str") do={
:if ([ :typeof ($HostInfo->"resolve") ] = "str" && [ $DNSIsResolving ] = true) do={
:do {
:local Resolve [ :resolve ($HostInfo->"resolve") ];
:if ($Resolve != $HostVal->"host") do={