fix(app): harden session runtime lifecycle #18

Merged
Naveax merged 1 commits from pr/harden-session-runtime-lifecycle into main 2026-09-06 11:24:03 +03:00
Naveax commented 2026-09-04 00:56:29 +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 work during disconnect and dispose
  • Ignore stale native VPN state
  • Resume the session timer when attaching to an already-running tunnel
  • Prevent stale 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 work during disconnect and dispose - Ignore stale native VPN state - Resume the session timer when attaching to an already-running tunnel - Prevent stale 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.
Sign in to join this conversation.