Skip to content

Commit

Permalink
Fix race on symdb stats update (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolesnikovae authored Aug 29, 2023
1 parent 4f7f5f1 commit e82efa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/phlaredb/symdb/symdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ func (s *SymDB) updateStatsLoop() {
case <-s.stop:
return
case <-t.C:
s.m.RLock()
s.m.Lock()
s.updateStats()
s.m.RUnlock()
s.m.Unlock()
}
}
}
Expand Down

0 comments on commit e82efa4

Please sign in to comment.