mirror of
https://github.com/1f349/orchid.git
synced 2024-12-21 23:54:12 +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() {
|
||||
// run a renewal check and log errors, but ignore ErrAlreadyRenewing
|
||||
err := s.renewalCheck()
|
||||
if err != nil && err != ErrAlreadyRenewing {
|
||||
if err != nil && !errors.Is(err, ErrAlreadyRenewing) {
|
||||
log.Println("[Renewal] Certificate check, an error occurred: ", err)
|
||||
}
|
||||
}()
|
||||
@ -277,6 +277,7 @@ func (s *Service) renewalCheck() error {
|
||||
|
||||
// renew succeeded
|
||||
log.Printf("[Renewal] Updated certificate %d successfully\n", localData.id)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user