Skip to content

Commit

Permalink
nsqlookupd: fix RUnlock
Browse files Browse the repository at this point in the history
  • Loading branch information
andyxning committed Nov 1, 2019
1 parent 7d96abd commit 53ee4e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nsqlookupd/registration_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ func (r *RegistrationDB) FindProducers(category string, key string, subkey strin
cachedKey := fmt.Sprintf("%s:%s:%s", category, key, subkey)

if val, found := r.cachedFindProducersResults.Get(cachedKey); found {
r.cachedMutex.Unlock()
r.cachedMutex.RUnlock()
return val.(Producers)
}

r.cachedMutex.Unlock()
r.cachedMutex.RUnlock()

r.cachedMutex.Lock()
defer r.cachedMutex.Unlock()
Expand Down

0 comments on commit 53ee4e4

Please sign in to comment.