From f7473e2d40c9b47da4cb09dae3fad3ff2af24291 Mon Sep 17 00:00:00 2001 From: Hendrik Jäger Date: Sat, 3 Feb 2024 21:25:46 +0100 Subject: another recursion attempt --- macir.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macir.rb b/macir.rb index 5c19aca..8a85cb9 100644 --- a/macir.rb +++ b/macir.rb @@ -186,12 +186,13 @@ def wait_for_challenge_propagation(domain, challenge) end def acme_request_with_retries(retries: 5, &block) + p "Retries: #{retries}" block.call(self) rescue Acme::Client::Error::BadNonce raise unless retries.positive? p 'Retrying because of invalid nonce.' - acme_request_with_retries(retries - 1, block) + acme_request_with_retries(retries: retries - 1) { block } end def wait_for_challenge_validation(challenge, cert_name) -- cgit v1.2.3