Shutdown() static private method

static private Shutdown ( ) : void
return void
Example #1
0
        internal static void OnBotShutdown()
        {
            if (Program.ShutdownSequenceInitialized || Program.WCF.IsServerRunning() || Bot.Bots.Values.Any(bot => bot.KeepRunning))
            {
                return;
            }

            Logging.LogGenericInfo("No bots are running, exiting");
            Task.Delay(5000).Wait();
            Program.Shutdown();
        }
Example #2
0
        internal static async void OnBotShutdown()
        {
            if (Program.IsWCFRunning || Bot.Bots.Values.Any(bot => bot.KeepRunning))
            {
                return;
            }

            ASF.ArchiLogger.LogGenericInfo("No bots are running, exiting");
            await Task.Delay(5000).ConfigureAwait(false);

            Program.Shutdown();
        }