mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
This commit is contained in:
@@ -7,7 +7,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
internal static void OnBotShutdown() {
|
||||
if (Bot.Bots.Values.Any(bot => bot.KeepRunning)) {
|
||||
if (Program.IsWCFRunning || Bot.Bots.Values.Any(bot => bot.KeepRunning)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static bool ShutdownSequenceInitialized;
|
||||
|
||||
internal static bool IsWCFRunning => WCF.IsServerRunning;
|
||||
|
||||
internal static void Exit(byte exitCode = 0) {
|
||||
Shutdown();
|
||||
Environment.Exit(exitCode);
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace ArchiSteamFarm {
|
||||
private ServiceHost ServiceHost;
|
||||
private Client Client;
|
||||
|
||||
internal bool IsServerRunning => ServiceHost != null;
|
||||
|
||||
internal static void Init() {
|
||||
if (string.IsNullOrEmpty(Program.GlobalConfig.WCFHostname)) {
|
||||
Program.GlobalConfig.WCFHostname = Program.GetUserInput(SharedInfo.EUserInputType.WCFHostname);
|
||||
|
||||
Reference in New Issue
Block a user