Fixes offlining an instance not changing the config

This commit is contained in:
Cyberboss
2017-11-01 16:46:08 -04:00
parent 328731c962
commit 40859b4fbe
2 changed files with 9 additions and 0 deletions
@@ -126,6 +126,13 @@ namespace TGServerService
return Config.Directory;
}
/// <summary>
/// Sets <see cref="InstanceConfig.Enabled"/> of <see cref="Config"/> to <see langword="false"/>
/// </summary>
public void Offline()
{
Config.Enabled = false;
}
//mostly generated code with a call to RunDisposals()
//you don't need to open this
+2
View File
@@ -593,6 +593,7 @@ namespace TGServerService
if (ic.Name == Name)
{
path = ic.Directory;
ic.Enabled = true;
return SetupOneInstance(ic);
}
}
@@ -612,6 +613,7 @@ namespace TGServerService
var inst = (ServerInstance)host.SingletonInstance;
host.Close();
path = inst.ServerDirectory();
inst.Offline();
inst.Dispose();
return null;
}