Fix race condition with systray ready (#2993)

This commit is contained in:
M. Essam 2024-12-14 22:17:53 +02:00 committed by GitHub
parent dcba6a6b7e
commit a4a30744ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -572,6 +572,7 @@ func (s *serviceClient) onTrayReady() {
s.update.SetOnUpdateListener(s.onUpdateAvailable)
go func() {
s.getSrvConfig()
time.Sleep(100 * time.Millisecond) // To prevent race condition caused by systray not being fully initialized and ignoring setIcon
for {
err := s.updateStatus()
if err != nil {