diff --git a/chains/chainApis.js b/chains/chainApis.js index 04d79bb..398b06e 100644 --- a/chains/chainApis.js +++ b/chains/chainApis.js @@ -74,6 +74,10 @@ function ChainApis(health) { return el.lastErrorAt <= (bestErrors + BEST_ERROR_DIFF * 1000) }) + const withoutRateLimit = urls.filter(el => !el.rateLimited) + if(withoutRateLimit.length){ + urls = withoutRateLimit + } return urls.sort((a, b) => { return a.responseTime - b.responseTime }) diff --git a/status/healthMonitor.js b/status/healthMonitor.js index a7526d3..04cd69e 100644 --- a/status/healthMonitor.js +++ b/status/healthMonitor.js @@ -122,7 +122,7 @@ function HealthMonitor() { } let nowAvailable = false; - if (errorCount <= ALLOWED_ERRORS && !rateLimited) { + if (errorCount <= ALLOWED_ERRORS) { nowAvailable = !error || !!urlHealth.available; } if (available && !nowAvailable) {