From f420054bb7157eabaae31cb98b1a295c110fedc1 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 18 Apr 2021 21:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dttlcache=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/ttlcache/piece.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ttlcache/piece.go b/internal/ttlcache/piece.go index 0f2834cb..eefd168b 100644 --- a/internal/ttlcache/piece.go +++ b/internal/ttlcache/piece.go @@ -30,7 +30,7 @@ func (this *Piece) IncreaseInt64(key uint64, delta int64, expiredAt int64) (resu this.locker.Lock() item, ok := this.m[key] if ok { - result := types.Int64(item.Value) + delta + result = types.Int64(item.Value) + delta item.Value = result item.expiredAt = expiredAt } else {