mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix sync: RUnlock of unlocked RWMutex
This commit is contained in:
@@ -31,8 +31,8 @@ func (v *DBReadCache) CloseDB() {
|
|||||||
func (v *DBReadCache) Get(xPath, name string) []byte {
|
func (v *DBReadCache) Get(xPath, name string) []byte {
|
||||||
cacheKey := v.makeDataCacheKey(xPath, name)
|
cacheKey := v.makeDataCacheKey(xPath, name)
|
||||||
v.dataCacheMutex.RLock()
|
v.dataCacheMutex.RLock()
|
||||||
defer v.dataCacheMutex.RUnlock()
|
|
||||||
if data, ok := v.dataCache[cacheKey]; ok {
|
if data, ok := v.dataCache[cacheKey]; ok {
|
||||||
|
defer v.dataCacheMutex.RUnlock()
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
v.dataCacheMutex.RUnlock()
|
v.dataCacheMutex.RUnlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user