mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-06 01:47:32 +02:00
Fix race condition with systray ready (#2993)
This commit is contained in:
parent
dcba6a6b7e
commit
a4a30744ad
@ -572,6 +572,7 @@ func (s *serviceClient) onTrayReady() {
|
|||||||
s.update.SetOnUpdateListener(s.onUpdateAvailable)
|
s.update.SetOnUpdateListener(s.onUpdateAvailable)
|
||||||
go func() {
|
go func() {
|
||||||
s.getSrvConfig()
|
s.getSrvConfig()
|
||||||
|
time.Sleep(100 * time.Millisecond) // To prevent race condition caused by systray not being fully initialized and ignoring setIcon
|
||||||
for {
|
for {
|
||||||
err := s.updateStatus()
|
err := s.updateStatus()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user