Browse Source

retry on bad nonce

master
AJ ONeal 1 year ago
parent
commit
137990002a
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      app/js/bluecrypt-acme.js

+ 10
- 0
app/js/bluecrypt-acme.js View File

@@ -2704,6 +2704,16 @@ ACME._jwsRequest = function (me, bigopts) {
//#console.debug('[acme-v2] ' + bigopts.url + ':');
//#console.debug(jws);
return ACME._request(me, { url: bigopts.url, json: jws });
}).catch(function (e) {
if (/badNonce$/.test(e.urn)) {
// retry badNonces
var retryable = (bigopts._retries >= 2);
if (!retryable) {
bigopts._retries = (bigopts._retries || 0) + 1;
return ACME._jwsRequest(me, bigopts);
}
}
throw e;
});
});
};


Loading…
Cancel
Save