From 36ef624c5196270d8e0e38a1467b33d3f89c57f8 Mon Sep 17 00:00:00 2001 From: Mika Kuns Date: Mon, 13 Apr 2026 14:46:46 +0200 Subject: [PATCH] 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 --- src/ClaudeDo.Ui/Services/WorkerClient.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ClaudeDo.Ui/Services/WorkerClient.cs b/src/ClaudeDo.Ui/Services/WorkerClient.cs index 08562f0..3570e9b 100644 --- a/src/ClaudeDo.Ui/Services/WorkerClient.cs +++ b/src/ClaudeDo.Ui/Services/WorkerClient.cs @@ -182,6 +182,7 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable public async ValueTask DisposeAsync() { + _startCts?.Cancel(); await _hub.DisposeAsync(); }