Skip to content
Snippets Groups Projects
Verified Commit 1e3491ea authored by meskio's avatar meskio :tent:
Browse files

[feat] remove the hack on exit

The systray quit is being fixed in our fork of the getlantern/systray.
parent e7ab6ad5
Branches
Tags
1 merge request!9[bug] use our own fork of the systray library
...@@ -17,7 +17,6 @@ package main ...@@ -17,7 +17,6 @@ package main
import ( import (
"log" "log"
"os"
"time" "time"
"0xacab.org/leap/bitmask-systray/bitmask" "0xacab.org/leap/bitmask-systray/bitmask"
...@@ -50,8 +49,7 @@ func run(bm *bitmask.Bitmask, conf *systrayConfig) { ...@@ -50,8 +49,7 @@ func run(bm *bitmask.Bitmask, conf *systrayConfig) {
} }
func (bt bmTray) onExit() { func (bt bmTray) onExit() {
// TODO: this doesn't get executed :( log.Println("Closing systray")
log.Println("Finished onExit")
} }
func (bt *bmTray) onReady() { func (bt *bmTray) onReady() {
...@@ -116,12 +114,6 @@ func (bt *bmTray) onReady() { ...@@ -116,12 +114,6 @@ func (bt *bmTray) onReady() {
case <-mQuit.ClickedCh: case <-mQuit.ClickedCh:
systray.Quit() systray.Quit()
// XXX: this a hack as quit doesn't work
// this should be done by defer in the main function
bt.bm.Close()
releasePID()
log.Println("Quit now...")
os.Exit(0)
case <-time.After(time.Minute * 30): case <-time.After(time.Minute * 30):
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment