Fixes service updates not restoring the comms key

This commit is contained in:
Cyberboss
2017-06-28 15:06:22 -04:00
parent fb432c8fc3
commit 39d0c1fd6b
4 changed files with 20 additions and 0 deletions
+3
View File
@@ -61,6 +61,9 @@
<setting name="SettingsVersion" serializeAs="String">
<value>0</value>
</setting>
<setting name="ReattachCommsKey" serializeAs="String">
<value />
</setting>
</TGServerService.Properties.Settings>
</userSettings>
</configuration>
+2
View File
@@ -53,6 +53,7 @@ namespace TGServerService
RestartInProgress = true;
currentPort = Properties.Settings.Default.ReattachPort;
serviceCommsKey = Properties.Settings.Default.ReattachCommsKey;
currentStatus = TGDreamDaemonStatus.Online;
DDWatchdog = new Thread(new ThreadStart(Watchdog));
DDWatchdog.Start();
@@ -270,6 +271,7 @@ namespace TGServerService
{
Properties.Settings.Default.ReattachPID = Proc.Id;
Properties.Settings.Default.ReattachPort = currentPort;
Properties.Settings.Default.ReattachCommsKey = serviceCommsKey;
RestartInProgress = true;
}
Proc.Close();
+12
View File
@@ -226,5 +226,17 @@ namespace TGServerService.Properties {
this["SettingsVersion"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ReattachCommsKey {
get {
return ((string)(this["ReattachCommsKey"]));
}
set {
this["ReattachCommsKey"] = value;
}
}
}
}
@@ -53,5 +53,8 @@
<Setting Name="SettingsVersion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ReattachCommsKey" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>