diff --git a/Packages/src/Editor/Infrastructure/Server/UnityCliLoopServerController.cs b/Packages/src/Editor/Infrastructure/Server/UnityCliLoopServerController.cs index 485a25dce..c2abc0bb5 100644 --- a/Packages/src/Editor/Infrastructure/Server/UnityCliLoopServerController.cs +++ b/Packages/src/Editor/Infrastructure/Server/UnityCliLoopServerController.cs @@ -343,6 +343,8 @@ private void OnServerLoopUnexpectedlyExited() // OnServerLoopExited fires from thread pool — marshal to main thread for Unity API safety EditorApplication.delayCall += () => { + // The server just crashed — startup protection blocks recovery if the crash happens + // within the 5-second protection window after a successful start _startupProtectionService.ClearStartupProtection(); VibeLogger.LogWarning( @@ -353,11 +355,6 @@ private void OnServerLoopUnexpectedlyExited() // Resources already cleaned up by CleanupAfterUnexpectedLoopExit — just clear the reference _bridgeServer = null; - - // The server just crashed — startup protection blocks recovery if the crash happens - // within the 5-second protection window after a successful start - _startupProtectionService.ClearStartupProtection(); - _recoveryTrackingService.ScheduleTrackedRecovery(() => StartRecoveryIfNeededAsync(false, CancellationToken.None)); }; }