ソースを参照

Fix AtomicResizeCacheList

Him188 5 年 前
コミット
f79d3f9aa0

+ 1 - 1
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/AtomicResizeCacheList.kt

@@ -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