mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 05:02:11 +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()
|
x.lock.Lock()
|
||||||
v, ok := x.core.Get(key)
|
v, ok := x.core.Get(key)
|
||||||
if ok {
|
if ok {
|
||||||
v.lock.Lock()
|
|
||||||
x.lock.Unlock()
|
x.lock.Unlock()
|
||||||
|
v.lock.Lock()
|
||||||
expires, value, err := v.expires, v.value, v.err
|
expires, value, err := v.expires, v.value, v.err
|
||||||
if expires != 0 && expires > time.Now().UnixMilli() {
|
if expires != 0 && expires > time.Now().UnixMilli() {
|
||||||
v.lock.Unlock()
|
v.lock.Unlock()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user