Skip to content

Commit

Permalink
Fix race condition with systray ready
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-essam committed Dec 5, 2024
1 parent 713e320 commit b2e2ea3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/ui/client_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b2e2ea3

Please sign in to comment.