Browse Source

address #86 should be possible to wait for cert renewal to complete

acmev2
AJ ONeal 7 years ago
parent
commit
5173962517
  1. 8
      lib/core.js

8
lib/core.js

@ -382,6 +382,7 @@ module.exports.create = function (le) {
// Certificates
, getAsync: function (args) {
var copy = utils.merge(args, le);
var renewing;
args = utils.tplCopy(copy);
return core.certificates.checkAsync(args).then(function (certs) {
@ -391,9 +392,14 @@ module.exports.create = function (le) {
}
if (core.certificates._isRenewable(args, certs)) {
certs._renewing = core.certificates.renewAsync(args, certs);
// it's time to renew the available cert
renewing = core.certificates.renewAsync(args, certs);
if (args.waitForRenewal) {
return renewing;
}
}
// return existing unexpired (although potentially stale) certificates when available
return certs;
}).then(function (results) {
// returns pems

Loading…
Cancel
Save