fix(centralui): SessionExpiry skips redirect after dispose (review 2026-10-21 07/C-3)

This commit is contained in:
Joseph Doherty
2026-10-22 08:35:10 -04:00
parent 1e3765ba6e
commit d36f360d35
2 changed files with 24 additions and 1 deletions
@@ -87,7 +87,11 @@
if (status == Unauthorized)
{
await InvokeAsync(() => Navigation.NavigateTo("/login", forceLoad: true));
// Dispose cancels the CTS but cannot cancel an in-flight ping; skip the redirect
// (and swallow a racing disposal) so the fire-and-forget poll task never faults.
if (_cts is { IsCancellationRequested: true }) return;
try { await InvokeAsync(() => Navigation.NavigateTo("/login", forceLoad: true)); }
catch (ObjectDisposedException) { }
}
}