Skip to content

Commit 8048cba

Browse files
committed
fix build issues
1 parent 9adbb30 commit 8048cba

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

StikJIT/Views/HomeView.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,14 @@ struct HomeView: View {
293293
startHeartbeatInBackground(showErrorUI: false)
294294
DispatchQueue.global(qos: .userInitiated).async {
295295
sleep(1)
296-
var error: NSError?
297-
let success = JITEnableContext.shared.killProcess(withPID: Int32(pid), error: &error)
298-
DispatchQueue.main.async {
299-
if success {
296+
do {
297+
try JITEnableContext.shared.killProcess(withPID: Int32(pid))
298+
DispatchQueue.main.async {
300299
LogManager.shared.addInfoLog("Killed process \(pid) via URL scheme")
301-
} else {
302-
LogManager.shared.addErrorLog("Failed to kill process \(pid): \(error?.localizedDescription ?? "Unknown error")")
300+
}
301+
} catch {
302+
DispatchQueue.main.async {
303+
LogManager.shared.addErrorLog("Failed to kill process \(pid): \(error.localizedDescription)")
303304
}
304305
}
305306
}

0 commit comments

Comments
 (0)