diff --git a/GameServer/managers/GameLoopManager/GameLoop.cs b/GameServer/managers/GameLoopManager/GameLoop.cs index 5298aa3db1..4521255f14 100644 --- a/GameServer/managers/GameLoopManager/GameLoop.cs +++ b/GameServer/managers/GameLoopManager/GameLoop.cs @@ -61,8 +61,12 @@ public static void Exit() if (_gameLoopThread == null) return; - _gameLoopThread.Interrupt(); - _gameLoopThread.Join(); + if (Thread.CurrentThread != _gameLoopThread) + { + _gameLoopThread.Interrupt(); + _gameLoopThread.Join(); + } + _gameLoopThread = null; _busyWaitThresholdThread.Interrupt(); _busyWaitThresholdThread.Join();