mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Fix some watchdog issues
This commit is contained in:
@@ -222,14 +222,13 @@
|
||||
export_lock = FALSE
|
||||
|
||||
/datum/tgs_api/v4/OnReboot()
|
||||
var/json = Export(TGS4_COMM_WORLD_REBOOT)
|
||||
var/list/result = json_decode(json)
|
||||
var/list/result = Export(TGS4_COMM_WORLD_REBOOT)
|
||||
if(!result)
|
||||
return
|
||||
|
||||
//okay so the standard TGS4 proceedure is: right before rebooting change the port to whatever was sent to us in the above json's data parameter
|
||||
|
||||
var/port = json[TGS4_PARAMETER_DATA]
|
||||
var/port = result[TGS4_PARAMETER_DATA]
|
||||
if(!isnum(port))
|
||||
return //this is valid, server may just want use to reboot
|
||||
|
||||
|
||||
@@ -713,9 +713,11 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
await Task.WhenAny(allTask, cancelTcs.Task).ConfigureAwait(false);
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
//both servers are now running, alpha is the active server, huzzah
|
||||
//both servers are now running, alpha is the active server(unless reattach), huzzah
|
||||
AlphaIsActive = doReattach ? reattachInfo?.AlphaIsActive ?? true : true;
|
||||
LastLaunchResult = alphaLrt.Result;
|
||||
(AlphaIsActive ? alphaServer : bravoServer).ClosePortOnReboot = true;
|
||||
|
||||
logger.LogInformation("Launched servers successfully");
|
||||
Running = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user