Add missing delay

This commit is contained in:
JustArchi
2016-10-29 20:47:21 +02:00
parent 4958fa82d7
commit 592aaed45b

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System.Threading.Tasks;
using SteamKit2;
namespace ArchiSteamFarm {
@@ -6,12 +7,13 @@ namespace ArchiSteamFarm {
internal static void OnStateUpdated(Bot bot, SteamFriends.PersonaStateCallback callback) {
}
internal static void OnBotShutdown() {
internal static async void OnBotShutdown() {
if (Program.IsWCFRunning || Bot.Bots.Values.Any(bot => bot.KeepRunning)) {
return;
}
Logging.LogGenericInfo("No bots are running, exiting");
await Task.Delay(5000).ConfigureAwait(false);
Program.Exit();
}
}