From 5b5607b43211849feec039c749b4696727ab049e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 5 May 2025 18:01:29 +0200 Subject: [PATCH] ipsec-to-dns: fail if global functions do not become ready Co-authored-by: Ilya Kulakov --- ipsec-to-dns.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipsec-to-dns.rsc b/ipsec-to-dns.rsc index 26dab0a2..89c8f428 100644 --- a/ipsec-to-dns.rsc +++ b/ipsec-to-dns.rsc @@ -10,7 +10,8 @@ # https://rsc.eworm.de/doc/ipsec-to-dns.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do {