1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00

Fix some invalid unlocks from the last change

This commit is contained in:
Makis Maropoulos
2016-07-07 13:05:11 +02:00
parent 871b43cae7
commit 0cb2351a4f
2 changed files with 1 additions and 3 deletions

View File

@@ -35,7 +35,6 @@ func (s *Store) Get(key string) interface{} {
if value, found := s.values[key]; found {
return value
}
s.mu.Unlock()
return nil
}
@@ -109,7 +108,7 @@ func (s *Store) SetLastAccessedTime(lastacc time.Time) {
s.lastAccessedTime = lastacc
}
// Destroy
// Destroy deletes all keys
func (s *Store) Destroy() {
// clears without provider's update.
s.mu.Lock()

View File

@@ -95,7 +95,6 @@ func (s *Store) VisitAll(cb func(k string, v interface{})) {
func (s *Store) Get(key string) interface{} {
Provider.Update(s.sid)
if value, found := s.values[key]; found {
s.mu.Unlock()
return value
}
return nil