Skip to content
Snippets Groups Projects
Unverified Commit a56b1ce6 authored by meskio's avatar meskio :tent:
Browse files

[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.
parent 60310f3b
Branches
Tags
1 merge request!24[feat] check regularly the status
......@@ -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)
}
}
}
}()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment