Skip to content

Km-15482: Fix out-of-order status change#35

Merged
kp-raafat-alhmidi merged 4 commits into
mainfrom
KM-15482
Apr 30, 2026
Merged

Km-15482: Fix out-of-order status change#35
kp-raafat-alhmidi merged 4 commits into
mainfrom
KM-15482

Conversation

@kp-raafat-alhmidi

Copy link
Copy Markdown
Contributor

Previously, when a connect attempt failed (e.g. SSL hostname mismatch), the
inner Start{Wireguard,OpenVpn}ConnectionController.handleFailure emitted
Disconnected before the outer StartConnectionController's cleanup path
emitted its own Disconnecting → Disconnected, producing an out-of-order
sequence visible to clients:

Connecting → Disconnected → Disconnecting → Disconnected

Changes:

  • Inner Start controllers no longer emit Disconnected on failure; they
    clear cache and rethrow so the outer cleanup path owns the terminal
    status sequence.
  • Stop{Wireguard,OpenVpn}ConnectionController now always emit Disconnected
    even when the cleanup chain fails partway (e.g. when stop is invoked
    from the Start failure path before native resources were created), so
    clients always observe a terminal state.

Result: handleConnectionStatusChange(...) sees the canonical
Connecting → Disconnecting → Disconnected(reason) on failure.

@kp-raafat-alhmidi kp-raafat-alhmidi merged commit 54169b3 into main Apr 30, 2026
3 checks passed
@kp-raafat-alhmidi kp-raafat-alhmidi deleted the KM-15482 branch April 30, 2026 10:58
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.

2 participants