Skip to content

Commit

Permalink
Handle RateLimitExceeded response from SteamApps.RequestFreeLicense
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Dec 10, 2024
1 parent facdd35 commit c8dcf29
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions FreePackages/PackageQueue/PackageQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,14 @@ private async Task<EResult> ClaimFreeApp(uint appID) {
return EResult.Timeout;
}

// The Result returned by RequestFreeLicense is useless and I've only ever seen it return EResult.OK
// Sometimes it'll return EResult.RateLimitExceeded, but this is unrelated to the package limit
if (response.Result != EResult.OK) {
Bot.ArchiLogger.LogGenericDebug(String.Format(ArchiSteamFarm.Localization.Strings.BotAddLicense, String.Format("app/{0}", appID), response.Result));

if (response.Result == EResult.RateLimitExceeded) {
// Note: this is the rate limit for this api, and is unrelated to the package limit
return EResult.Timeout;
}

return EResult.Fail;
}

Expand Down

0 comments on commit c8dcf29

Please sign in to comment.