fix: turn the tray icon off when the tunnel dies on its own #102
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/tray-off-icon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Only
kill()— the user clicking disconnect — reset the tray icon toaqomui_off. When openvpn exited for any other reason (ping-restart exhaustion, killed process, service restart),tunnel_terminatedonly hid the active-server widget: the tray kept the colored icon, claiming a connection that no longer existed. The tray tooltip likewise read "Status: disconnected" forever, since onlykill()ever set it.Fix
tunnel_terminatedresets the icon, the tooltip, andtunnel_activeitself — guarded ontunnel_active == 1, so the stale termination of a server switch (wherekill()already ran,tunnel_activeis 0, and the icon belongs to the connection now being established) leaves the tray alone.connection_establishedsets the tooltip to the connected server's name.Verification
Two new stub-based tests in tests/test_aqomui_gui.py: the tunnel dying on its own turns the icon off (and resets
tunnel_active); the stale termination of a server switch leaves the icon and tooltip untouched. Full suite: 171 passed.Closes #69
🤖 Generated with Claude Code