mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Schedule semaphore release in background
This commit is contained in:
@@ -104,8 +104,10 @@ namespace ArchiSteamFarm {
|
||||
|
||||
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) {
|
||||
|
||||
@@ -39,8 +39,10 @@ namespace ArchiSteamFarm {
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user