prevent race in telemetry worker cleanup (#2879)
This commit is contained in:
@@ -128,6 +128,12 @@ func (s *StatsWorker) Close() bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
func (s *StatsWorker) Closed() bool {
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
return !s.closedAt.IsZero()
|
||||
}
|
||||
|
||||
func (s *StatsWorker) collectStats(
|
||||
ts *timestamppb.Timestamp,
|
||||
streamType livekit.StreamType,
|
||||
|
||||
Reference in New Issue
Block a user