diff --git a/InterlinedList/App.xaml.cs b/InterlinedList/App.xaml.cs index 6d683ba..73c4952 100644 --- a/InterlinedList/App.xaml.cs +++ b/InterlinedList/App.xaml.cs @@ -59,7 +59,10 @@ protected override async void OnStartup(StartupEventArgs e) // so drop the session instead and let the login screen surface // the server's own rejection when they try again (#50). AppLog.Info("Restored session belongs to a closed account; discarding it and showing login."); - AppServices.Session.Logout(); + // ClearLocalSession, not LogoutAsync: the account is closed, so + // there is no useful server call to make — and both call sites are + // synchronous. LogoutAsync is for a user-initiated sign-out. + AppServices.Session.ClearLocalSession(); ShowLoginWindow(); } else if (restored) @@ -133,7 +136,10 @@ private void ShowLoginWindow() if (IsAccountClosed()) { AppLog.Info("Sign-in produced a closed account; refusing to open the shell."); - AppServices.Session.Logout(); + // ClearLocalSession, not LogoutAsync: the account is closed, so + // there is no useful server call to make — and both call sites are + // synchronous. LogoutAsync is for a user-initiated sign-out. + AppServices.Session.ClearLocalSession(); return; }