Fix always on

This commit is contained in:
世界
2024-04-10 20:48:15 +08:00
parent debd0ca1a2
commit 1c5bc23a25
4 changed files with 15 additions and 18 deletions
@@ -1,4 +1,3 @@
import Libbox
import Library
import NetworkExtension
import SwiftUI
@@ -81,16 +80,7 @@ public struct StartStopButton: View {
try await profile.start()
await environments.logClient.connect()
} else {
var err: Error?
do {
try LibboxNewStandaloneCommandClient()!.serviceClose()
} catch {
err = error
}
await profile.stop()
if let err {
throw err
}
try await profile.stop()
}
} catch {
await MainActor.run {