We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb0667e commit 1413f5aCopy full SHA for 1413f5a
Coder Desktop/Coder Desktop/XPCInterface.swift
@@ -6,14 +6,17 @@ import VPNLib
6
@objc final class VPNXPCInterface: NSObject, VPNXPCClientCallbackProtocol, @unchecked Sendable {
7
private var svc: CoderVPNService
8
private let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "VPNXPCInterface")
9
- private var xpc: VPNXPCProtocol? = nil
+ private var xpc: VPNXPCProtocol?
10
11
init(vpn: CoderVPNService) {
12
svc = vpn
13
super.init()
14
}
15
16
func connect() {
17
+ guard xpc == nil else {
18
+ return
19
+ }
20
let networkExtDict = Bundle.main.object(forInfoDictionaryKey: "NetworkExtension") as? [String: Any]
21
let machServiceName = networkExtDict?["NEMachServiceName"] as? String
22
let xpcConn = NSXPCConnection(machServiceName: machServiceName!)
0 commit comments