Skip to content

Commit

Permalink
logandretry doesn't retry (#35)
Browse files Browse the repository at this point in the history
hourly recheck for renewals doesn't run
due to timer not set
  • Loading branch information
YetaWF authored Feb 28, 2020
1 parent 1cf3def commit 8382d12
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ private async Task RunOnceWithErrorHandlingAsync()
try
{
await RunOnceAsync();
_timer?.Change(Timeout.InfiniteTimeSpan, TimeSpan.FromHours(1));
_timer?.Change(TimeSpan.FromHours(1), TimeSpan.FromHours(1));
}
catch (Exception e) when (_options.RenewalFailMode != RenewalFailMode.Unhandled)
{
_logger.LogWarning(e, $"Exception occured renewing certificates: '{e.Message}.'");
if (_options.RenewalFailMode == RenewalFailMode.LogAndRetry)
_timer?.Change(Timeout.InfiniteTimeSpan, TimeSpan.FromMinutes(1));
_timer?.Change(TimeSpan.FromMinutes(1), TimeSpan.FromMinutes(1));
}
}

Expand Down

0 comments on commit 8382d12

Please sign in to comment.