mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-25 06:50:09 +08:00
Fix AtomicResizeCacheList
This commit is contained in:
parent
e1c1c35d70
commit
f79d3f9aa0
@ -48,7 +48,7 @@ internal class AtomicResizeCacheList<E>(private val retention: Long) {
|
||||
for (cache in list) {
|
||||
val instant = cache.time.value
|
||||
when {
|
||||
instant == currentTime -> {
|
||||
instant == 0L -> {
|
||||
if (cache.time.compareAndSet(instant, currentTime + retention)) {
|
||||
cache.element = element
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user