mirror of
https://github.com/1f349/orchid.git
synced 2024-12-22 08:04:10 +00:00
Better error checking for already renewing
This commit is contained in:
parent
8234a34c6f
commit
b10db2f73d
@ -242,7 +242,7 @@ func (s *Service) renewalRoutine(wg *sync.WaitGroup) {
|
|||||||
go func() {
|
go func() {
|
||||||
// run a renewal check and log errors, but ignore ErrAlreadyRenewing
|
// run a renewal check and log errors, but ignore ErrAlreadyRenewing
|
||||||
err := s.renewalCheck()
|
err := s.renewalCheck()
|
||||||
if err != nil && err != ErrAlreadyRenewing {
|
if err != nil && !errors.Is(err, ErrAlreadyRenewing) {
|
||||||
log.Println("[Renewal] Certificate check, an error occurred: ", err)
|
log.Println("[Renewal] Certificate check, an error occurred: ", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@ -277,6 +277,7 @@ func (s *Service) renewalCheck() error {
|
|||||||
|
|
||||||
// renew succeeded
|
// renew succeeded
|
||||||
log.Printf("[Renewal] Updated certificate %d successfully\n", localData.id)
|
log.Printf("[Renewal] Updated certificate %d successfully\n", localData.id)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user