diff --git a/package-lock.json b/package-lock.json index f22779a..0ea6dc7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "server-ssl", - "version": "50.0.1", + "version": "50.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "server-ssl", - "version": "50.0.1", + "version": "50.0.2", "license": "Apache-2.0", "dependencies": { "base-acme-client": "^30.0.3", diff --git a/package.json b/package.json index bfeab52..36c43d6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "server-ssl", "author": "FirstTimeEZ", - "version": "50.0.1", + "version": "50.0.2", "description": "Node.js server that is SSL by default that can be used for development or production and can create and renew Lets Encrypt Certificates automatically using ACME, including wildcard certificates", "main": "template; do not import; read the Getting Started of the README, maybe you want to use: lets-encrypt-acme-client", "type": "module", diff --git a/ssl/state.js b/ssl/state.js index b108d2a..98ce8c4 100644 --- a/ssl/state.js +++ b/ssl/state.js @@ -293,9 +293,9 @@ export const STATE = { }, checkNodeForUpdates: async () => { if (STATE.optNoVersionCheck !== true) { - const response = await fetchAndRetryUntilOk(STATE.NODE_URL, { method: 'GET', redirect: 'follow' }); + const response = await fetchAndRetryUntilOk(STATE.NODE_URL, { method: 'GET', redirect: 'follow' }, 3, true); - if (response.ok) { + if (response && response.ok) { const split = response.url.split("/"); if (split.length === STATE.NODE_URL_SPLITS) {