Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1413f5a

Browse files
committed
avoid double connecting
1 parentbb0667e commit1413f5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎Coder Desktop/Coder Desktop/XPCInterface.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ import VPNLib
66
@objcfinalclassVPNXPCInterface:NSObject,VPNXPCClientCallbackProtocol,@uncheckedSendable{
77
privatevarsvc:CoderVPNService
88
privateletlogger=Logger(subsystem:Bundle.main.bundleIdentifier!, category:"VPNXPCInterface")
9-
privatevarxpc:VPNXPCProtocol?=nil
9+
privatevarxpc:VPNXPCProtocol?
1010

1111
init(vpn:CoderVPNService){
1212
svc= vpn
1313
super.init()
1414
}
1515

1616
func connect(){
17+
guard xpc==nilelse{
18+
return
19+
}
1720
letnetworkExtDict=Bundle.main.object(forInfoDictionaryKey:"NetworkExtension")as?[String:Any]
1821
letmachServiceName=networkExtDict?["NEMachServiceName"]as?String
1922
letxpcConn=NSXPCConnection(machServiceName: machServiceName!)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp