sniCallback: noop on async getCertificates error, fix #1

This commit is contained in:
Michael Yin 2019-01-30 17:06:23 +13:00
parent fd06582813
commit 6c8de20090
1 changed files with 4 additions and 1 deletions

View File

@ -146,7 +146,10 @@ module.exports.create = function (autoSni) {
// give the cert some time (2-5 min) to be validated and replaced before trying again
certMeta.renewAt = (autoSni._dbg_now || Date.now()) + (2 * MIN) + (3 * MIN * Math.random());
// let the update happen in the background
autoSni.getCertificatesAsync(domain, certMeta.certs).then(autoSni.cacheCerts);
autoSni.getCertificatesAsync(domain, certMeta.certs).then(autoSni.cacheCerts, function (error) {
// console.error('ERROR in le-sni-auto:');
// console.error(err.stack || err);
})
}
// return the valid cert right away