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:
David Cowden 2020-05-11 21:25:31 -07:00
parent a857c45847
commit 9f18882973

View file

@ -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
}