Skip to content

Commit

Permalink
linear: use RLock when reading
Browse files Browse the repository at this point in the history
  • Loading branch information
fscnick committed Sep 4, 2022
1 parent 54bb6cd commit 5bc4080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/server/stream/v3/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ func (s *StreamState) SetKnownResourceNamesAsList(url string, names []string) {
}

func (s *StreamState) GetKnownResourceNames(url string) map[string]struct{} {
s.mu.Lock()
defer s.mu.Unlock()
s.mu.RLock()
defer s.mu.RUnlock()

return s.knownResourceNames[url]
}
Expand Down

0 comments on commit 5bc4080

Please sign in to comment.