Skip to content

Commit

Permalink
utils: fix the safemap Items
Browse files Browse the repository at this point in the history
  • Loading branch information
astaxie committed Jul 26, 2014
1 parent ee9749d commit e7fcb82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/safemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,9 @@ func (m *BeeMap) Delete(k interface{}) {
func (m *BeeMap) Items() map[interface{}]interface{} {
m.lock.RLock()
defer m.lock.RUnlock()
return m.bm
r := make(map[interface{}]interface{})
for k, v := range m.bm {
r[k] = v
}
return r
}

0 comments on commit e7fcb82

Please sign in to comment.