diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 751bf1638dfc9..3a85ea61df1d9 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -104,8 +104,10 @@ internal static void Restart() { internal static async Task LimitSteamRequestsAsync() { await SteamSemaphore.WaitAsync().ConfigureAwait(false); - await Utilities.SleepAsync(5 * 1000).ConfigureAwait(false); // We must add some delay to not get caught by Steam rate limiter - SteamSemaphore.Release(); + var releaseLater = Task.Run(async () => { + await Utilities.SleepAsync(5000).ConfigureAwait(false); // We must add some delay to not get caught by Steam rate limiter + SteamSemaphore.Release(); + }); } internal static string GetUserInput(string botLogin, EUserInputType userInputType, string extraInformation = null) { diff --git a/ArchiSteamFarm/Trading.cs b/ArchiSteamFarm/Trading.cs index 52d357d894138..a1b71dd89bcbb 100644 --- a/ArchiSteamFarm/Trading.cs +++ b/ArchiSteamFarm/Trading.cs @@ -39,8 +39,10 @@ internal sealed class Trading { internal static async Task LimitInventoryRequestsAsync() { await InventorySemaphore.WaitAsync().ConfigureAwait(false); - await Utilities.SleepAsync(3000).ConfigureAwait(false); // We must add some delay to not get caught by Steam rate limiter - InventorySemaphore.Release(); + var releaseLater = Task.Run(async () => { + await Utilities.SleepAsync(3000).ConfigureAwait(false); // We must add some delay to not get caught by Steam rate limiter + InventorySemaphore.Release(); + }); } internal Trading(Bot bot) {