diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-09-06 10:29:30 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-09-06 15:45:41 +0200 |
commit | a56b1ce6018a88ee7b3c146ff8d124c56aaed974 (patch) | |
tree | 9cab16583c17b68012e1243ff256348be127764d /systray.go | |
parent | 60310f3bf825989636904da411340bec8e711e2a (diff) |
[feat] check regularly the status
Don't trust that the status will be reported by openvpn/bitmaskd
correctly. Let's do polling every 5 seconds.
Diffstat (limited to 'systray.go')
-rw-r--r-- | systray.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -142,6 +142,13 @@ func (bt *bmTray) onReady() { systray.Quit() case <-signalCh: systray.Quit() + + case <-time.After(5 * time.Second): + if status, err := bt.bm.GetStatus(); err != nil { + log.Printf("Error getting status: %v", err) + } else { + bt.changeStatus(status) + } } } }() |