diff --git a/Torch/Commands/TorchCommands.cs b/Torch/Commands/TorchCommands.cs index 9e904ee..3d487e5 100644 --- a/Torch/Commands/TorchCommands.cs +++ b/Torch/Commands/TorchCommands.cs @@ -152,6 +152,12 @@ namespace Torch.Commands [Command("restart", "Restarts the server.")] public void Restart(int countdownSeconds = 10, bool save = true) { + if (_restartPending) + { + Context.Respond("A restart is already pending."). + return; + } + _restartPending = true; Task.Run(() => { @@ -267,4 +273,4 @@ namespace Torch.Commands }, this, TaskContinuationOptions.RunContinuationsAsynchronously); } } -} \ No newline at end of file +}