fix(app): harden session runtime lifecycle #13

Closed
Naveax wants to merge 4 commits from pr/harden-session-runtime-lifecycle into main
pull from: pr/harden-session-runtime-lifecycle
Naveax commented 2026-09-04 00:17:38 +03:00 (Migrated from github.com)

Summary

Harden Flutter-side session and VPN lifecycle handling against stale asynchronous work and rapid state transitions.

Changes

  • Scope connect and dispose work to the current lifecycle epoch
  • Cancel stale Hivemind requests during disconnect and dispose
  • Ignore stale native VPN state
  • Resume the session timer when attaching to an already-running tunnel
  • Prevent old session work from modifying a newer session
  • Serialize overlapping session synchronization
  • Ensure forced support synchronization is not swallowed by periodic sync
  • Harden rapid Connect → Disconnect → Connect transitions

No transport protocol changes are included.

## Summary Harden Flutter-side session and VPN lifecycle handling against stale asynchronous work and rapid state transitions. ## Changes - Scope connect and dispose work to the current lifecycle epoch - Cancel stale Hivemind requests during disconnect and dispose - Ignore stale native VPN state - Resume the session timer when attaching to an already-running tunnel - Prevent old session work from modifying a newer session - Serialize overlapping session synchronization - Ensure forced support synchronization is not swallowed by periodic sync - Harden rapid Connect → Disconnect → Connect transitions No transport protocol changes are included.

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.