diff --git a/Torch.Server/TorchServer.cs b/Torch.Server/TorchServer.cs index ca1ee43..f5a9b56 100644 --- a/Torch.Server/TorchServer.cs +++ b/Torch.Server/TorchServer.cs @@ -30,6 +30,7 @@ using VRage.Library; using VRage.ObjectBuilders; using VRage.Plugins; using VRage.Utils; + #pragma warning disable 618 namespace Torch.Server @@ -182,7 +183,8 @@ namespace Torch.Server if (!mre.WaitOne(TimeSpan.FromSeconds(Instance.Config.TickTimeout))) { var mainThread = MySandboxGame.Static.UpdateThread; - mainThread.Suspend(); + if (mainThread.IsAlive) + mainThread.Suspend(); var stackTrace = new StackTrace(mainThread, true); throw new TimeoutException($"Server watchdog detected that the server was frozen for at least {((TorchServer)state).Config.TickTimeout} seconds.\n{stackTrace}"); }