diff --git a/src/cert/acme2.js b/src/cert/acme2.js index f32ef8cef..18eacd515 100644 --- a/src/cert/acme2.js +++ b/src/cert/acme2.js @@ -572,7 +572,7 @@ Acme2.prototype.acmeFlow = function (hostname, domain, callback) { Acme2.prototype.getDirectory = function (callback) { const that = this; - request.get(this.caDirectory, { json: true, timeout: 30000 }, function (error, response) { + request.retry(5).get(this.caDirectory, { json: true, timeout: 30000 }, function (error, response) { if (error) return callback(new BoxError(BoxError.NETWORK_ERROR, `Network error getting directory: ${error.message}`)); if (response.statusCode !== 200) return callback(new BoxError(BoxError.EXTERNAL_ERROR, 'Invalid response code when fetching directory : ' + response.statusCode));