mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-25 12:42:12 +08:00
revert lock timing.
This commit is contained in:
parent
723a95f3aa
commit
78cc2af4a5
@ -59,8 +59,8 @@ func (x *LazyLRU[K, V]) Get(key K, fetch func() (V, error)) (V, error) {
|
||||
x.lock.Lock()
|
||||
v, ok := x.core.Get(key)
|
||||
if ok {
|
||||
v.lock.Lock()
|
||||
x.lock.Unlock()
|
||||
v.lock.Lock()
|
||||
expires, value, err := v.expires, v.value, v.err
|
||||
if expires != 0 && expires > time.Now().UnixMilli() {
|
||||
v.lock.Unlock()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user