Fix:sortedset Add()有bug #26

This commit is contained in:
pengyejun
2021-07-14 21:45:31 +08:00
committed by finley
parent 7b0df5cda3
commit a34d6d7e55

View File

@@ -27,7 +27,7 @@ func (sortedSet *SortedSet) Add(member string, score float64) bool {
}
if ok {
if score != element.Score {
sortedSet.skiplist.remove(member, score)
sortedSet.skiplist.remove(member, element.Score)
sortedSet.skiplist.insert(member, score)
}
return false