summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2024-02-03 21:25:46 +0100
committerHendrik Jäger <gitcommit@henk.geekmail.org>2024-02-03 21:25:46 +0100
commitf7473e2d40c9b47da4cb09dae3fad3ff2af24291 (patch)
tree27d52fec5df4aa4dbb57616867cc98038d44d04d
parenta80fcaab83ff8dda046d3749443db38260327dcc (diff)
another recursion attemptfeature/recursive_retrying
-rw-r--r--macir.rb3
1 files changed, 2 insertions, 1 deletions
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)