File tree 1 file changed +3
-3
lines changed
Coder Desktop/Coder Desktop/Views
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ struct VPNMenu<VPN: VPNService, S: Session>: View {
10
10
// an error is shown: "The VPN session failed because an internal error occurred".
11
11
// This forces the user to wait a few seconds before they can toggle the VPN back on.
12
12
@State private var waitCleanup = false
13
- private var waitCleanupDuration : Duration = . seconds( 4 )
13
+ private var waitCleanupDuration : Duration = . seconds( 4 )
14
14
15
15
let inspection = Inspection < Self > ( )
16
16
@@ -94,7 +94,7 @@ struct VPNMenu<VPN: VPNService, S: Session>: View {
94
94
95
95
private var vpnDisabled : Bool {
96
96
waitCleanup ||
97
- !session. hasSession ||
97
+ !session. hasSession ||
98
98
vpn. state == . connecting ||
99
99
vpn. state == . disconnecting ||
100
100
vpn. state == . failed( . systemExtensionError( . needsUserApproval) )
@@ -104,7 +104,7 @@ struct VPNMenu<VPN: VPNService, S: Session>: View {
104
104
await vpn. stop ( )
105
105
waitCleanup = true
106
106
Task {
107
- try await Task . sleep ( for: waitCleanupDuration)
107
+ try ? await Task . sleep ( for: waitCleanupDuration)
108
108
waitCleanup = false
109
109
}
110
110
}
You can’t perform that action at this time.
0 commit comments