From 6c8de2009043462d4538a8fc4bebd2c96f76199b Mon Sep 17 00:00:00 2001 From: Michael Yin Date: Wed, 30 Jan 2019 17:06:23 +1300 Subject: [PATCH] sniCallback: noop on async getCertificates error, fix #1 --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2e33dc5..8c5b88e 100644 --- a/index.js +++ b/index.js @@ -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