Skip to content

Commit cfb3dd5

Browse files
committed
fixup
1 parent febf414 commit cfb3dd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Coder Desktop/Coder Desktop/Views/VPNMenu.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct VPNMenu<VPN: VPNService, S: Session>: View {
1010
// an error is shown: "The VPN session failed because an internal error occurred".
1111
// This forces the user to wait a few seconds before they can toggle the VPN back on.
1212
@State private var waitCleanup = false
13-
private var waitCleanupDuration: Duration = .seconds(4)
13+
private var waitCleanupDuration: Duration = .seconds(4)
1414

1515
let inspection = Inspection<Self>()
1616

@@ -94,7 +94,7 @@ struct VPNMenu<VPN: VPNService, S: Session>: View {
9494

9595
private var vpnDisabled: Bool {
9696
waitCleanup ||
97-
!session.hasSession ||
97+
!session.hasSession ||
9898
vpn.state == .connecting ||
9999
vpn.state == .disconnecting ||
100100
vpn.state == .failed(.systemExtensionError(.needsUserApproval))
@@ -104,7 +104,7 @@ struct VPNMenu<VPN: VPNService, S: Session>: View {
104104
await vpn.stop()
105105
waitCleanup = true
106106
Task {
107-
try await Task.sleep(for: waitCleanupDuration)
107+
try? await Task.sleep(for: waitCleanupDuration)
108108
waitCleanup = false
109109
}
110110
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy