mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-19 01:05:37 +03: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 newCertMeta acme.CertificateResource
|
||||||
var success bool
|
var success bool
|
||||||
for attempts := 0; attempts < 2; attempts++ {
|
for attempts := 0; attempts < 2; attempts++ {
|
||||||
|
namesObtaining.Add([]string{name})
|
||||||
acmeMu.Lock()
|
acmeMu.Lock()
|
||||||
newCertMeta, err = c.RenewCertificate(certMeta, true)
|
newCertMeta, err = c.RenewCertificate(certMeta, true)
|
||||||
acmeMu.Unlock()
|
acmeMu.Unlock()
|
||||||
|
namesObtaining.Remove([]string{name})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
success = true
|
success = true
|
||||||
break
|
break
|
||||||
|
|
|
@ -214,9 +214,11 @@ func (c *Config) renewCertName(name string, allowPrompts bool) error {
|
||||||
var newCertMeta acme.CertificateResource
|
var newCertMeta acme.CertificateResource
|
||||||
var success bool
|
var success bool
|
||||||
for attempts := 0; attempts < 2; attempts++ {
|
for attempts := 0; attempts < 2; attempts++ {
|
||||||
|
namesObtaining.Add([]string{name})
|
||||||
acmeMu.Lock()
|
acmeMu.Lock()
|
||||||
newCertMeta, err = client.RenewCertificate(certMeta, true)
|
newCertMeta, err = client.RenewCertificate(certMeta, true)
|
||||||
acmeMu.Unlock()
|
acmeMu.Unlock()
|
||||||
|
namesObtaining.Remove([]string{name})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
success = true
|
success = true
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue