mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 05:56:58 +01:00
Fixes to locked logging IDs and Control Panel
This commit is contained in:
@@ -27,8 +27,9 @@ namespace TGControlPanel
|
||||
/// <param name="I">The <see cref="TGServiceInterface.Interface"/> for the <see cref="ControlPanel"/></param>
|
||||
public ControlPanel(Interface I)
|
||||
{
|
||||
Interface = I;
|
||||
InitializeComponent();
|
||||
Interface = I;
|
||||
Text += " Instance: " + I.InstanceName;
|
||||
if (Interface.VersionMismatch(out string error) && MessageBox.Show(error, "Warning", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
|
||||
{
|
||||
Close();
|
||||
|
||||
@@ -95,8 +95,7 @@ namespace TGControlPanel
|
||||
/// <param name="instanceName">The name of the <see cref="TGServiceInterface.Components.ITGInstance"/> to connect to</param>
|
||||
async void TryConnectToInstance(string instanceName)
|
||||
{
|
||||
var activeCP = ControlPanel.InstancesInUse[instanceName];
|
||||
if(activeCP != null)
|
||||
if(ControlPanel.InstancesInUse.TryGetValue(instanceName, out ControlPanel activeCP))
|
||||
{
|
||||
activeCP.BringToFront();
|
||||
return;
|
||||
|
||||
@@ -391,6 +391,7 @@ namespace TGServerService
|
||||
var instance = (ServerInstance)host.SingletonInstance;
|
||||
host.Close();
|
||||
instance.Dispose();
|
||||
UnlockLoggingID(instance.LoggingID);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -615,6 +616,7 @@ namespace TGServerService
|
||||
path = inst.ServerDirectory();
|
||||
inst.Offline();
|
||||
inst.Dispose();
|
||||
UnlockLoggingID(inst.LoggingID);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user