Skip to content

Commit cbd8ce4

Browse files
committed
move on start
1 parent e04f61a commit cbd8ce4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Coder-Desktop/Coder-Desktop/VPN/VPNService.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ final class CoderVPNService: NSObject, VPNService {
9797
return
9898
}
9999

100-
onStart?()
101-
102100
menuState.clear()
103101
await startTunnel()
104102
logger.debug("network extension enabled")
@@ -185,8 +183,11 @@ extension CoderVPNService {
185183
// Connected -> Connected: no-op
186184
case (.connected, .connected):
187185
break
188-
// Non-connecting -> Connecting: Establish XPC
186+
// Non-connecting -> Connecting:
187+
// - Establish XPC
188+
// - Run `onStart` closure
189189
case (_, .connecting):
190+
onStart?()
190191
xpc.connect()
191192
xpc.ping()
192193
tunnelState = .connecting

0 commit comments

Comments
 (0)