small changes

This commit is contained in:
yusing
2024-11-30 01:06:06 +08:00
parent 10591452e4
commit 4188bbc5bd
2 changed files with 4 additions and 3 deletions

View File

@@ -155,11 +155,11 @@ func (p *Provider) ScheduleRenewal() {
go func() {
task := task.GlobalTask("cert renew scheduler")
defer task.Finish("cert renew scheduler stopped")
for {
renewalTime := p.ShouldRenewOn()
timer := time.NewTimer(time.Until(renewalTime))
select {
case <-task.Context().Done():
timer.Stop()