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 parent56b3a88 commit8d8a21aCopy full SHA for 8d8a21a
Coder Desktop/Coder Desktop/Coder_DesktopApp.swift
@@ -69,15 +69,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
69
// or return `.terminateNow`
70
func applicationShouldTerminate(_:NSApplication)->NSApplication.TerminateReply{
71
Task{
72
-letvpnStop=Task{
73
-if!state.stopVPNOnQuit{
74
-await vpn.stop()
+asyncletvpnTask:Void={
+ ifawait !self.state.stopVPNOnQuit{
+awaitself.vpn.stop()
75
}
76
-}
77
-letfileSyncStop=Task{
78
-await fileSyncDaemon.stop()
79
80
- _=await(vpnStop.value, fileSyncStop.value)
+}()
+asyncletfileSyncTask:Void=self.fileSyncDaemon.stop()
+ _=await(vpnTask, fileSyncTask)
81
NSApp.reply(toApplicationShouldTerminate:true)
82
83
return.terminateLater