Don't add margin for rate limit delays

This commit is contained in:
Tyrrrz
2022-12-15 20:18:32 +02:00
parent e5d5f1c85f
commit 324d6bab20
2 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ public static class Http
{
// If rate-limited, use retry-after header as the guide
if (result.Result.Headers.RetryAfter?.Delta is { } retryAfter)
return retryAfter + TimeSpan.FromSeconds(1);
return retryAfter;
return TimeSpan.FromSeconds(Math.Pow(2, i) + 1);
},