mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Implement ISessionController.ResetRebootState()
This commit is contained in:
@@ -79,5 +79,10 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> resulting in <see langword="true"/> if the operation succeeded, <see langword="false"/> otherwise</returns>
|
||||
Task<bool> SetRebootState(RebootState newRebootState, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes <see cref="RebootState"/> to <see cref="Components.Watchdog.RebootState.Normal"/> without telling the DMAPI
|
||||
/// </summary>
|
||||
void ResetRebootState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,5 +333,12 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
|
||||
return await SendCommand(String.Format(CultureInfo.InvariantCulture, "{0}&{1}={2}", InteropConstants.DMTopicChangeReboot, InteropConstants.DMParameterNewRebootMode, (int)newRebootState), cancellationToken).ConfigureAwait(false) == InteropConstants.DMResponseSuccess;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ResetRebootState()
|
||||
{
|
||||
CheckDisposed();
|
||||
reattachInformation.RebootState = RebootState.Normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user