fix(ports): never hop to default when stored port busy; prefer stored port and let bind micro-retry handle release to avoid port swapping on recompiles

main
David Sarno 2025-08-08 08:37:02 -07:00
parent 1b892dcf49
commit f4bc7cd4fd
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ namespace UnityMcpBridge.Editor.Helpers
Debug.Log($"Stored port {storedConfig.unity_port} became available after short wait");
return storedConfig.unity_port;
}
// Prefer sticking to the same port; let the caller handle bind retries/fallbacks
return storedConfig.unity_port;
}
// If no valid stored port, find a new one and save it