diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index f977be94b..2ccdd1c70 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -777,9 +777,13 @@ namespace ArchiSteamFarm { continue; // Without changing the bot } - if (currentBot.SteamClient.IsConnected) { + if (!currentBot.SteamClient.IsConnected) { + currentBot = null; // Either bot will be changed, or loop aborted + } else { ArchiHandler.PurchaseResponseCallback result = await currentBot.ArchiHandler.RedeemKey(key).ConfigureAwait(false); - if (result != null) { + if (result == null) { + currentBot = null; // Either bot will be changed, or loop aborted + } else { switch (result.PurchaseResult) { case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.DuplicatedKey: case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.InvalidKey: