Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
kill app when we can't connect to driver
Browse files Browse the repository at this point in the history
  • Loading branch information
btoews committed Aug 1, 2017
1 parent 101135b commit 4519b2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SoftU2FTool/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
if !U2FAuthenticator.start() {
print("Error starting authenticator")
NSApplication.shared().terminate(self)
}

}

func applicationWillTerminate(_ aNotification: Notification) {
if !U2FAuthenticator.stop() {
if U2FAuthenticator.shared != nil && !U2FAuthenticator.stop() {
print("Error stopping authenticator")
}
}
Expand Down

0 comments on commit 4519b2b

Please sign in to comment.