Skip to content

Commit de4b0e5

Browse files
fix: avoid automatically reconfiguring vpn (#218)
I added this block of code as a convenience, during the time we were using a workaround for the XPC issue that involved deleting and reinserting the network extension when updated. This block of code meant the user didn't need to click back into the tray menu to get the VPN configuration prompt to appear, it would just appear as soon as necessary. However, this introduces a race. If the app loads the VPN unconfigured view before the task that checks for an existing VPN configuration finishes (this task runs as part of `applicationDidFinishLaunching`), the user will be displayed the prompt to reconfigure, even if a valid configuration already exists. Since we're not using the aforementioned workaround, this convenience is no longer necessary, and can be removed as the race is more likely to be an issue.
1 parent 441bff5 commit de4b0e5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Coder-Desktop/Coder-Desktop/Views/VPN/VPNState.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ struct VPNState<VPN: VPNService>: View {
2828
} label: {
2929
Text("Reconfigure VPN")
3030
}
31-
}.onAppear {
32-
// Show the prompt onAppear, so the user doesn't have to
33-
// open the menu bar an extra time
34-
state.reconfigure()
3531
}
3632
case (.disabled, _):
3733
Text("Enable Coder Connect to see workspaces")

0 commit comments

Comments
 (0)