From df30da55c47db14c4422915ef96b242cc9e069c9 Mon Sep 17 00:00:00 2001 From: nilsk Date: Fri, 10 Jul 2026 13:00:39 +0200 Subject: [PATCH] fixes a hot load race condition causing saved plugins to be skipped which makes them disappear until the next reload --- .../Tools/PluginSystem/PluginFactory.Loading.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs index b46409a5..56f3ea23 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs @@ -35,8 +35,9 @@ public static partial class PluginFactory return; } - if (!await PLUGIN_LOAD_SEMAPHORE.WaitAsync(0, cancellationToken)) - return; + // Wait for ongoing reloads instead of silently skipping this request. + // This caller must return only after its reload has run. + await PLUGIN_LOAD_SEMAPHORE.WaitAsync(cancellationToken); var configObjectList = new List();