mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
SessionControllers now manage chatJsonTrackingContext.Active
This commit is contained in:
@@ -88,5 +88,10 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// Changes <see cref="RebootState"/> to <see cref="Components.Watchdog.RebootState.Normal"/> without telling the DMAPI
|
||||
/// </summary>
|
||||
void ResetRebootState();
|
||||
|
||||
/// <summary>
|
||||
/// Enables the reading of custom chat commands from the <see cref="ISessionController"/>
|
||||
/// </summary>
|
||||
void EnableCustomChatCommands();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,6 +200,8 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
|
||||
rebootTcs = new TaskCompletionSource<object>();
|
||||
|
||||
process.Lifetime.ContinueWith(x => chatJsonTrackingContext.Active = false, TaskScheduler.Current);
|
||||
|
||||
async Task<LaunchResult> GetLaunchResult()
|
||||
{
|
||||
var startTime = DateTimeOffset.Now;
|
||||
@@ -353,6 +355,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
case Constants.DMCommandWorldReboot:
|
||||
if (ClosePortOnReboot)
|
||||
{
|
||||
chatJsonTrackingContext.Active = false;
|
||||
content = new Dictionary<string, int> { { Constants.DMParameterData, 0 } };
|
||||
portClosedForReboot = true;
|
||||
}
|
||||
@@ -386,6 +389,9 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
throw new ObjectDisposedException(nameof(SessionController));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void EnableCustomChatCommands() => chatJsonTrackingContext.Active = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ReattachInformation Release()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user