From ef08e8b8a0833826ce2bb242503e2e7fcf6a5040 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 23 Sep 2020 12:24:03 +0200 Subject: [PATCH] fix: precheck function. --- pkg/provider/acme/provider.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/provider/acme/provider.go b/pkg/provider/acme/provider.go index 715a591f8..1283db6d8 100644 --- a/pkg/provider/acme/provider.go +++ b/pkg/provider/acme/provider.go @@ -265,15 +265,15 @@ func (p *Provider) getClient() (*lego.Client, error) { err = client.Challenge.SetDNS01Provider(provider, dns01.CondOption(len(p.DNSChallenge.Resolvers) > 0, dns01.AddRecursiveNameservers(p.DNSChallenge.Resolvers)), dns01.WrapPreCheck(func(domain, fqdn, value string, check dns01.PreCheckFunc) (bool, error) { - if p.DNSChallenge.DisablePropagationCheck { - return true, nil - } - if p.DNSChallenge.DelayBeforeCheck > 0 { logger.Debugf("Delaying %d rather than validating DNS propagation now.", p.DNSChallenge.DelayBeforeCheck) time.Sleep(time.Duration(p.DNSChallenge.DelayBeforeCheck)) } + if p.DNSChallenge.DisablePropagationCheck { + return true, nil + } + return check(fqdn, value) }), )