We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentbb0667e commit1413f5aCopy full SHA for 1413f5a
Coder Desktop/Coder Desktop/XPCInterface.swift
@@ -6,14 +6,17 @@ import VPNLib
6
@objcfinalclassVPNXPCInterface:NSObject,VPNXPCClientCallbackProtocol,@uncheckedSendable{
7
privatevarsvc:CoderVPNService
8
privateletlogger=Logger(subsystem:Bundle.main.bundleIdentifier!, category:"VPNXPCInterface")
9
-privatevarxpc:VPNXPCProtocol?=nil
+privatevarxpc:VPNXPCProtocol?
10
11
init(vpn:CoderVPNService){
12
svc= vpn
13
super.init()
14
}
15
16
func connect(){
17
+guard xpc==nilelse{
18
+return
19
+}
20
letnetworkExtDict=Bundle.main.object(forInfoDictionaryKey:"NetworkExtension")as?[String:Any]
21
letmachServiceName=networkExtDict?["NEMachServiceName"]as?String
22
letxpcConn=NSXPCConnection(machServiceName: machServiceName!)