e7fcb824 by astaxie

utils: fix the safemap Items

1 parent ee9749d6
...@@ -72,5 +72,9 @@ func (m *BeeMap) Delete(k interface{}) { ...@@ -72,5 +72,9 @@ func (m *BeeMap) Delete(k interface{}) {
72 func (m *BeeMap) Items() map[interface{}]interface{} { 72 func (m *BeeMap) Items() map[interface{}]interface{} {
73 m.lock.RLock() 73 m.lock.RLock()
74 defer m.lock.RUnlock() 74 defer m.lock.RUnlock()
75 return m.bm 75 r := make(map[interface{}]interface{})
76 for k, v := range m.bm {
77 r[k] = v
78 }
79 return r
76 } 80 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!