diff --git a/app/MindWork AI Studio/Tools/Services/UpdateService.cs b/app/MindWork AI Studio/Tools/Services/UpdateService.cs index bfabc7a0..65b8f76e 100644 --- a/app/MindWork AI Studio/Tools/Services/UpdateService.cs +++ b/app/MindWork AI Studio/Tools/Services/UpdateService.cs @@ -55,6 +55,12 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver await this.CheckForUpdate(); } } + + public override async Task StopAsync(CancellationToken cancellationToken) + { + this.messageBus.Unregister(this); + await base.StopAsync(cancellationToken); + } #endregion @@ -79,16 +85,6 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver #endregion - #region Overrides of BackgroundService - - public override async Task StopAsync(CancellationToken cancellationToken) - { - this.messageBus.Unregister(this); - await base.StopAsync(cancellationToken); - } - - #endregion - private async Task CheckForUpdate(bool notifyUserWhenNoUpdate = false) { if(!IS_INITIALIZED)