Do not attempt farming if steam client is not connected, closes #36

This commit is contained in:
JustArchi
2015-12-18 14:46:28 +01:00
parent 9f4ed24704
commit 754b52647b
2 changed files with 1 additions and 5 deletions

View File

@@ -562,10 +562,6 @@ namespace ArchiSteamFarm {
return;
}
if (SteamClient == null) {
return;
}
await CardsFarmer.StopFarming().ConfigureAwait(false);
Logging.LogGenericWarning(BotName, "Disconnected from Steam, reconnecting...");

View File

@@ -321,7 +321,7 @@ namespace ArchiSteamFarm {
}
private async Task CheckGamesForFarming() {
if (NowFarming || GamesToFarm.Count > 0) {
if (NowFarming || GamesToFarm.Count > 0 || !Bot.SteamClient.IsConnected) {
return;
}