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:
@@ -182,6 +182,7 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
_startCts?.Cancel();
|
||||
await _hub.DisposeAsync();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user