mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
Whoops, finishing up the last commit properly
Need to add the name to namesObtaining each time we use the ACME client.
This commit is contained in:
parent
8e75ae2495
commit
46bc0d5c4e
2 changed files with 4 additions and 0 deletions
|
@ -236,9 +236,11 @@ func (c *ACMEClient) Renew(name string) error {
|
|||
var newCertMeta acme.CertificateResource
|
||||
var success bool
|
||||
for attempts := 0; attempts < 2; attempts++ {
|
||||
namesObtaining.Add([]string{name})
|
||||
acmeMu.Lock()
|
||||
newCertMeta, err = c.RenewCertificate(certMeta, true)
|
||||
acmeMu.Unlock()
|
||||
namesObtaining.Remove([]string{name})
|
||||
if err == nil {
|
||||
success = true
|
||||
break
|
||||
|
|
|
@ -214,9 +214,11 @@ func (c *Config) renewCertName(name string, allowPrompts bool) error {
|
|||
var newCertMeta acme.CertificateResource
|
||||
var success bool
|
||||
for attempts := 0; attempts < 2; attempts++ {
|
||||
namesObtaining.Add([]string{name})
|
||||
acmeMu.Lock()
|
||||
newCertMeta, err = client.RenewCertificate(certMeta, true)
|
||||
acmeMu.Unlock()
|
||||
namesObtaining.Remove([]string{name})
|
||||
if err == nil {
|
||||
success = true
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue