Skip to content

Commit

Permalink
Extend on-demand timeout to 3 minutes
Browse files Browse the repository at this point in the history
Motivated by https://caddy.community/t/zerossl-dns-challenge-failing-often-route53-plugin/13822/25?u=matt

This seems excessive but has been confirmed to fix the problem in most cases.
  • Loading branch information
mholt committed Oct 7, 2021
1 parent 6b2f5f9 commit c17cc71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ func (cfg *Config) obtainOnDemandCertificate(hello *tls.ClientHelloInfo) (Certif
}

// TODO: use a proper context; we use one with timeout because retries are enabled because interactive is false
ctx, cancel := context.WithTimeout(context.TODO(), 90*time.Second)
// (timeout duration is based on https://caddy.community/t/zerossl-dns-challenge-failing-often-route53-plugin/13822/24?u=matt)
ctx, cancel := context.WithTimeout(context.TODO(), 180*time.Second)
defer cancel()

// Obtain the certificate
Expand Down

0 comments on commit c17cc71

Please sign in to comment.