Skip to content

Commit a7e0bd2

Browse files
committed
Fix: Use force_refresh=True in unity_instances resource for cache consistency
The unity_instances resource was using force_refresh=False, which returned cached instances (5-second cache). This caused a mismatch with set_active_instance which uses force_refresh=True, leading to instances being shown in the resource that no longer existed when trying to set them as active. By changing to force_refresh=True, the resource now always shows current instances that match what set_active_instance sees, fixing the instance switching issue.
1 parent fdb9859 commit a7e0bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Server/resources/unity_instances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def unity_instances(ctx: Context) -> dict[str, Any]:
3434

3535
try:
3636
pool = get_unity_connection_pool()
37-
instances = pool.discover_all_instances(force_refresh=False)
37+
instances = pool.discover_all_instances(force_refresh=True)
3838

3939
# Check for duplicate project names
4040
name_counts = {}

0 commit comments

Comments
 (0)