diff --git a/utils/curl.js b/utils/curl.js index c67c66b..9edf24f 100644 --- a/utils/curl.js +++ b/utils/curl.js @@ -96,7 +96,13 @@ const get = async (pathname, options) => { await pause(5000) } if (statusCode === 404) logger.warn('404') - else logger.error('Error : ', statusCode) + if (statusCode === 35) { + logger.warn('SSL connect error, retrying') + // If this error happens, it means that we have been banned + // So we wait 5 minutes before retrying + // I added 10 seconds to be sure that the server is ready + await pause(1000 * 60 * 5 + 10000) + } else logger.error('Error : ', statusCode) throw { code: statusCode } } return { data, statusCode }