Implement ISessionController.ResetRebootState()

This commit is contained in:
Cyberboss
2018-07-18 10:58:02 -04:00
parent 94729b10ba
commit 4af3bd811e
2 changed files with 13 additions and 1 deletions
@@ -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;
}
}
}