Skip to content
Snippets Groups Projects
Commit 2d0f7c1a authored by meskio's avatar meskio :tent: Committed by Kali Kaneko
Browse files

[feat] if quit stop vpn

As a side effect if the user shuts down the systray it will not
autostart next time.

- Related: #19
parent dfef7e3a
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,12 @@ func run(bm *bitmask.Bitmask, conf *systrayConfig) {
}
func (bt bmTray) onExit() {
status, _ := bt.bm.GetStatus()
if status != "off" {
ch := bt.bm.GetStatusCh()
bt.bm.StopVPN()
status = <-ch
}
log.Println("Closing systray")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment