Skip to content

Commit

Permalink
fix: avoid potential deadlocks when operating UniqueStringList (numap…
Browse files Browse the repository at this point in the history
…roj#905)

Fixes numaproj#863

Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang authored and yhl25 committed Aug 1, 2023
1 parent 75c7f97 commit d0bfac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/daemon/server/service/rater/uniq_str_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (l *UniqueStringList) MoveToBack(value string) {
func (l *UniqueStringList) Front() string {
l.lock.RLock()
defer l.lock.RUnlock()
if l.Length() == 0 {
if l.l.Len() == 0 {
return ""
}
return l.l.Front().Value.(string)
Expand Down

0 comments on commit d0bfac6

Please sign in to comment.