fix(centralui): SessionExpiry skips redirect after dispose (review 2026-10-21 07/C-3)
This commit is contained in:
@@ -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) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user