fix(ui): cancel retry loop before disposing worker connection

Add _startCts?.Cancel() at the top of DisposeAsync to prevent
ConnectWithRetryAsync from calling _hub.StartAsync on an already-disposed
HubConnection when the caller disposes without first calling StopAsync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mika Kuns
2026-04-13 14:46:46 +02:00
parent c6522cf8c1
commit 36ef624c51

View File

@@ -182,6 +182,7 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable
public async ValueTask DisposeAsync()
{
_startCts?.Cancel();
await _hub.DisposeAsync();
}