diff --git a/utils/safemap.go b/utils/safemap.go index 27c63eba..e99aceee 100644 --- a/utils/safemap.go +++ b/utils/safemap.go @@ -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 }