Skip to content

fix(vpn): no restart when a stopped VPN fails its startup check - #3485

Merged
qdm12 merged 1 commit into
passteque:masterfrom
jackboykin:fix/vpn-stopped-startup-check
Sep 23, 2026
Merged

qdm12 merged 1 commit into
passteque:masterfrom
jackboykin:fix/vpn-stopped-startup-check

Conversation

@jackboykin

@jackboykin jackboykin commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Type

Please tick which one the following applies to your pull request:

  • it is AI generated 🤖 and I did review it 👨👩
  • it is humanly written like the good old days 👨‍🎨👩‍🎨
  • it is AI generated 🤖 I did not review it 💤

Description

A VPN run stopped during its startup check gets restarted anyway: the check fails on the canceled context, and onTunnelUp calls restartVPN. This returns early instead.

Repro, with a custom wireguard provider pointing at an unreachable endpoint: during the startup check, PUT /v1/vpn/status {"status":"stopped"}. 15s later, master reports running; this PR reports stopped.

In production, a settings change at the same moment turned this into a restart storm.

A VPN run stopped during its startup check, for example with
PUT /v1/vpn/status, fails the check because its context is canceled,
and then restarts the VPN anyway.

@qdm12 qdm12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

@qdm12
qdm12 merged commit 1267bae into passteque:master Sep 23, 2026
7 checks passed
@jackboykin
jackboykin deleted the fix/vpn-stopped-startup-check branch September 24, 2026 10:20
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