Never attempt to loot non-connected bot instance

This commit is contained in:
JustArchi
2016-08-02 05:06:52 +02:00
parent e2dca65165
commit 2c10ebe8b3

View File

@@ -778,7 +778,7 @@ namespace ArchiSteamFarm {
return null;
}
await Task.WhenAll(Bots.Values.Select(bot => bot.ResponseLoot(steamID))).ConfigureAwait(false);
await Task.WhenAll(Bots.Values.Where(bot => bot.SteamClient.IsConnected).Select(bot => bot.ResponseLoot(steamID))).ConfigureAwait(false);
return "Done!";
}