Handle multiple RLE entries concurrently

This commit is contained in:
JustArchi
2019-05-04 23:27:31 +02:00
parent 0be906918f
commit 45062e3369

View File

@@ -2081,14 +2081,14 @@ namespace ArchiSteamFarm {
case EResult.RateLimitExceeded:
ArchiLogger.LogGenericInfo(string.Format(Strings.BotRateLimitExceeded, TimeSpan.FromMinutes(LoginCooldownInMinutes).ToHumanReadable()));
await LoginRateLimitingSemaphore.WaitAsync().ConfigureAwait(false);
Utilities.InBackground(
async () => {
await Task.Delay(LoginCooldownInMinutes * 60 * 1000).ConfigureAwait(false);
LoginRateLimitingSemaphore.Release();
}
);
if (await LoginRateLimitingSemaphore.WaitAsync(WebBrowser.MaxTries * 1000).ConfigureAwait(false)) {
Utilities.InBackground(
async () => {
await Task.Delay(LoginCooldownInMinutes * 60 * 1000).ConfigureAwait(false);
LoginRateLimitingSemaphore.Release();
}
);
}
break;
}