forked from TrueCloudLab/certificates
acme/challenge: Copy retry information on clone
When cloning a challenge, deeply clone the retry field if it is not nil.
This commit is contained in:
parent
a857c45847
commit
9f18882973
1 changed files with 4 additions and 2 deletions
|
@ -240,8 +240,10 @@ func (bc *baseChallenge) save(db nosql.DB, old challenge) error {
|
|||
|
||||
func (bc *baseChallenge) clone() *baseChallenge {
|
||||
u := *bc
|
||||
r := *bc.Retry
|
||||
u.Retry = &r
|
||||
if bc.Retry != nil {
|
||||
r := *bc.Retry
|
||||
u.Retry = &r
|
||||
}
|
||||
return &u
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue