From c507dc255a3f5ad932fa84e21b605366d726aa55 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sun, 23 Oct 2022 15:23:32 +1300 Subject: [PATCH] rarbg: fix retry loop. only retry once. #13663 --- src/Jackett.Common/Indexers/RarBG.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Jackett.Common/Indexers/RarBG.cs b/src/Jackett.Common/Indexers/RarBG.cs index 569def7f6..d21939a2d 100644 --- a/src/Jackett.Common/Indexers/RarBG.cs +++ b/src/Jackett.Common/Indexers/RarBG.cs @@ -146,7 +146,7 @@ namespace Jackett.Common.Indexers { logger.Warn("torrentapi.org returned Error 520, retrying after 8 secs"); Thread.Sleep(5500); // 5500 + 2500 enforced at front of query = 8s - return await PerformQueryWithRetry(query, false); + return retry ? await PerformQueryWithRetry(query, false) : releases; } // the response was not JSON, likely a HTML page for a server outage logger.Warn(response.ContentString); @@ -176,7 +176,7 @@ namespace Jackett.Common.Indexers if (jsonContent.ContainsKey("rate_limit")) { logger.Warn("Rate Limit exceeded. Retrying after 2.5 secs."); - return await PerformQueryWithRetry(query, false); + return retry ? await PerformQueryWithRetry(query, false) : releases; } // the api returns "no results" in some valid queries. we do one retry on this case but we can't do more // because we can't distinguish between search without results and api malfunction