mirror of https://github.com/oxen-io/lokinet
macos: Fix hanging --start when Lokinet already running
If you stop/start the GUI but it doesn't exit on start, the second --start (when lokinet is already running) waits for a state change that doesn't come (because lokinet is already running). This add a check for already-running so that we exit right away in such a case.
This commit is contained in:
parent
307ae40e00
commit
dc358a6eda
|
@ -116,6 +116,12 @@ class LokinetMain: NSObject, NSApplicationDelegate {
|
|||
} catch {
|
||||
self.result(msg: "There was a fatal error")
|
||||
}
|
||||
|
||||
// Check if we are already connected because, if so, we won't get a
|
||||
// status change and will just hang waiting for one.
|
||||
if self.vpnManager.connection.status == .connected {
|
||||
self.result(msg: "VPN already connected");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue