*Don't retry on boot, but catch any retry failures

This commit is contained in:
Derrick Hammer 2022-08-22 12:39:09 -04:00
parent 7f135c80b1
commit 573ebec0a4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 17 additions and 12 deletions

View File

@ -118,19 +118,24 @@ async function setupSSl(bootup: boolean) {
let domainValid = false;
let dateValid = false;
let configDomain = config.str("domain");
let retryOptions = bootup ? {} : { retry: 0 };
try {
await promiseRetry(async (retry: any) => {
sslCert = await getSslCert();
if (!sslCert) {
retry();
}
});
}, retryOptions);
await promiseRetry(async (retry: any) => {
sslKey = await getSslCert();
if (!sslKey) {
retry();
}
});
}, retryOptions);
} catch {}
if (sslCert && sslKey) {
sslParams.cert = Buffer.from((sslCert as IndependentFileSmall).fileData);