summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-03-19 11:17:56 +0100
committerRuben Pollan <meskio@sindominio.net>2018-03-20 10:29:26 +0100
commit1e3491ea2cac285fb393a27de5f6d7407e42981c (patch)
treed80d570c1b524c4e6582a328dfc05620ec572be0
parente7ab6ad504b0a7524766717c9b68c2ac332f07f1 (diff)
[feat] remove the hack on exit
The systray quit is being fixed in our fork of the getlantern/systray.
-rw-r--r--systray.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/systray.go b/systray.go
index d72562c..bc53f01 100644
--- a/systray.go
+++ b/systray.go
@@ -17,7 +17,6 @@ package main
import (
"log"
- "os"
"time"
"0xacab.org/leap/bitmask-systray/bitmask"
@@ -50,8 +49,7 @@ func run(bm *bitmask.Bitmask, conf *systrayConfig) {
}
func (bt bmTray) onExit() {
- // TODO: this doesn't get executed :(
- log.Println("Finished onExit")
+ log.Println("Closing systray")
}
func (bt *bmTray) onReady() {
@@ -116,12 +114,6 @@ func (bt *bmTray) onReady() {
case <-mQuit.ClickedCh:
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):
}