From 602cda73b76822a31e2a44bda8866a7d9c6e07b1 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sun, 21 Aug 2016 18:03:56 +0200 Subject: [PATCH] Closes #335 We need to alter the flow in order to check for result updates on each loop instead of the beginning --- ArchiSteamFarm/Bot.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 1084e1bd6..56f851567 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -1040,8 +1040,7 @@ namespace ArchiSteamFarm { } bool alreadyHandled = false; - foreach (Bot bot in Bots.Where(bot => (bot.Value != this) && bot.Value.SteamClient.IsConnected && ((result.Items.Count == 0) || result.Items.Keys.Any(packageID => !bot.Value.OwnedPackageIDs.Contains(packageID)))).OrderBy(bot => bot.Key).Select(bot => bot.Value)) { - + foreach (Bot bot in Bots.Where(bot => (bot.Value != this) && bot.Value.SteamClient.IsConnected).OrderBy(bot => bot.Key).Select(bot => bot.Value).Where(bot => (result.Items.Count == 0) || result.Items.Keys.Any(packageID => bot.OwnedPackageIDs.Contains(packageID)))) { ArchiHandler.PurchaseResponseCallback otherResult = await bot.ArchiHandler.RedeemKey(key).ConfigureAwait(false); if (otherResult == null) { response.Append(Environment.NewLine + "<" + bot.BotName + "> Key: " + key + " | Status: Timeout!");