Improves service upgrade messages

This commit is contained in:
Cyberboss
2017-09-24 08:36:58 -04:00
parent 8fb69bee7d
commit 2cab2cfe4e
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -114,6 +114,7 @@ namespace TGInstallerWrapper
try
{
Server.GetComponent<ITGSService>().PrepareForUpdate();
Thread.Sleep(3000); //chat messages
}
catch
{
+7 -2
View File
@@ -46,7 +46,11 @@ namespace TGServerService
if (Proc == null)
throw new Exception("GetProcessById returned null!");
TGServerService.WriteInfo("Reattached to running DD process!", TGServerService.EventID.DDReattachSuccess);
SendMessage("DD: Update complete. Watch dog reactivated...", ChatMessageType.WatchdogInfo);
ThreadPool.QueueUserWorkItem(_ =>
{
Thread.Sleep(5000);
SendMessage("DD: Update complete. Watch dog reactivated...", ChatMessageType.WatchdogInfo);
});
//start wd
RestartInProgress = true;
@@ -299,7 +303,8 @@ namespace TGServerService
AwaitingShutdown = ShutdownRequestPhase.None;
if (!RestartInProgress)
{
SendMessage("DD: Server stopped, watchdog exiting...", ChatMessageType.WatchdogInfo);
if(!Properties.Settings.Default.ReattachToDD)
SendMessage("DD: Server stopped, watchdog exiting...", ChatMessageType.WatchdogInfo);
TGServerService.WriteInfo("Watch dog exited", TGServerService.EventID.DDWatchdogExit);
}
else