mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
rarbg: fix retry loop. only retry once. #13663
This commit is contained in:
@@ -146,7 +146,7 @@ namespace Jackett.Common.Indexers
|
|||||||
{
|
{
|
||||||
logger.Warn("torrentapi.org returned Error 520, retrying after 8 secs");
|
logger.Warn("torrentapi.org returned Error 520, retrying after 8 secs");
|
||||||
Thread.Sleep(5500); // 5500 + 2500 enforced at front of query = 8s
|
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
|
// the response was not JSON, likely a HTML page for a server outage
|
||||||
logger.Warn(response.ContentString);
|
logger.Warn(response.ContentString);
|
||||||
@@ -176,7 +176,7 @@ namespace Jackett.Common.Indexers
|
|||||||
if (jsonContent.ContainsKey("rate_limit"))
|
if (jsonContent.ContainsKey("rate_limit"))
|
||||||
{
|
{
|
||||||
logger.Warn("Rate Limit exceeded. Retrying after 2.5 secs.");
|
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
|
// 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
|
// because we can't distinguish between search without results and api malfunction
|
||||||
|
Reference in New Issue
Block a user