fix(ui): auto-reconnect worker connection with retry backoff

Add IndefiniteRetryPolicy for WithAutomaticReconnect, wrap initial
StartAsync in a retry loop so the UI keeps retrying when Worker is
offline at startup, and expose IsReconnecting to StatusBar
("Connecting..." / "Online" / "Offline").
This commit is contained in:
Mika Kuns
2026-04-13 14:40:36 +02:00
parent 48e4aabeb1
commit c6522cf8c1
2 changed files with 58 additions and 14 deletions

View File

@@ -18,9 +18,12 @@ public partial class StatusBarViewModel : ViewModelBase
worker.PropertyChanged += (_, e) =>
{
if (e.PropertyName == nameof(WorkerClient.IsConnected))
if (e.PropertyName == nameof(WorkerClient.IsConnected) ||
e.PropertyName == nameof(WorkerClient.IsReconnecting))
{
ConnectionStatus = worker.IsConnected ? "Online" : "Offline";
ConnectionStatus = worker.IsConnected ? "Online"
: worker.IsReconnecting ? "Connecting..."
: "Offline";
}
};