fix(core): update

This commit is contained in:
Philipp Kunz 2020-02-19 19:17:58 +00:00
parent c7ee7eb774
commit ab55d3c91a

View File

@ -114,9 +114,6 @@ export class SmartAcme {
const certDomainName = this.certmatcher.getCertificateDomainNameByDomainName(domainArg); const certDomainName = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomainName); const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomainName);
const shouldberenewed = retrievedCertificate.shouldBeRenewed();
const isStillValid = retrievedCertificate.isStillValid();
if (!retrievedCertificate && await this.certmanager.interestMap.checkInterest(certDomainName)) { if (!retrievedCertificate && await this.certmanager.interestMap.checkInterest(certDomainName)) {
const existingCertificateInterest = this.certmanager.interestMap.findInterest(certDomainName); const existingCertificateInterest = this.certmanager.interestMap.findInterest(certDomainName);
const certificate = existingCertificateInterest.interestFullfilled; const certificate = existingCertificateInterest.interestFullfilled;
@ -128,7 +125,7 @@ export class SmartAcme {
} }
// lets make sure others get the same interest // lets make sure others get the same interest
await this.certmanager.interestMap.addInterest(certDomainName); const currentDomainInterst = await this.certmanager.interestMap.addInterest(certDomainName);
/* Place new order */ /* Place new order */
@ -208,6 +205,8 @@ export class SmartAcme {
}); });
const newCertificate = await this.certmanager.retrieveCertificate(certDomainName); const newCertificate = await this.certmanager.retrieveCertificate(certDomainName);
currentDomainInterst.fullfillInterest(newCertificate);
currentDomainInterst.destroy();
return newCertificate; return newCertificate;
} }
} }