Skip to content

Fix LanisSession timer lifecycle and cached-applet re-authentication - #15

Merged
alessioc42 merged 3 commits into
mainfrom
fix/session-timer-and-cached-reauth
Nov 22, 2026
Merged

alessioc42 merged 3 commits into
mainfrom
fix/session-timer-and-cached-reauth

Conversation

@alessioc42

Copy link
Copy Markdown
Member
  • LanisSession timer lifecycle:
    • Cancel any existing preventLogoutTimer before jar.deleteAll() at the start of _authenticate().
    • Track disposal and logout generation so an in-flight _authenticate() cannot start a leaked preventLogoutTimer after deAuthenticate() or dispose().
  • Automatic re-authentication for cached applets:
    • In AppletParser.fetchCachedData, catch non-transport, non-CacheUnavailableException errors on the first try (when policy != CacheReadPolicy.cacheOnly), call ctx.session.authenticate(), and retry once—matching legacy fetchData recovery on session expiry.
  • Tests: Add timer lifecycle regression tests in test/session_keep_alive_test.dart and cached-applet re-authentication tests in test/applet_reauthentication_test.dart.

@alessioc42
alessioc42 merged commit d02b68a into main Nov 22, 2026
1 check passed
@alessioc42
alessioc42 deleted the fix/session-timer-and-cached-reauth branch November 22, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant