Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Apr 22, 2024
1 parent 7c751a3 commit 4c59016
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cache/priority_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ func (pq *PriorityQueue) Put(priority int, value PriorityQueueItem) bool {
if !found || !min.Less(entry) {
return false
}
pq.mutex.Unlock()
pq.Remove(min.Value.ID())
pq.mutex.Lock()
}
} else if entry.Priority != priority { // delete before update
pq.btree.Delete(entry)
Expand Down

0 comments on commit 4c59016

Please sign in to comment.