|
@@ -223,15 +223,22 @@ namespace PRSServer
|
|
|
|
|
|
private void DoTheWork()
|
|
|
{
|
|
|
- Logger.Send(LogType.Information, "", "** DOING WORKING *****************************************");
|
|
|
- Logger.Send(LogType.Information, "", $"DNS Names: {Properties.DomainNames}");
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Logger.Send(LogType.Information, "", "** DOING WORKING *****************************************");
|
|
|
+ Logger.Send(LogType.Information, "", $"DNS Names: {Properties.DomainNames}");
|
|
|
|
|
|
- var acmeUrl = new Uri(Properties.CaUrl);
|
|
|
- using var acme = new AcmeProtocolClient(acmeUrl, usePostAsGet: true);
|
|
|
+ var acmeUrl = new Uri(Properties.CaUrl);
|
|
|
+ using var acme = new AcmeProtocolClient(acmeUrl, usePostAsGet: true);
|
|
|
|
|
|
- ClearAuthorizations(acme).Wait();
|
|
|
- var task = DoTheWorkAsync(acme);
|
|
|
- task.Wait();
|
|
|
+ ClearAuthorizations(acme).Wait();
|
|
|
+ var task = DoTheWorkAsync(acme);
|
|
|
+ task.Wait();
|
|
|
+ }
|
|
|
+ catch(Exception e)
|
|
|
+ {
|
|
|
+ Logger.Send(LogType.Error, "", CoreUtils.FormatException(e));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private async Task ClearAuthorizations(AcmeProtocolClient acme)
|