瀏覽代碼

fix: lock error

master
Blaz Smehov 9 小時之前
父節點
當前提交
d0157ce6ae
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      internal/pkg/common/appcontext/context.go

+ 5
- 1
internal/pkg/common/appcontext/context.go 查看文件

@@ -188,7 +188,11 @@ func (m *AppState) CleanLookup() {
func (m *AppState) GetBeaconLookup() map[string]string {
m.beaconsLookup.Lock.RLock()
defer m.beaconsLookup.Lock.RUnlock()
return m.beaconsLookup.Lookup
cp := make(map[string]string, len(m.beaconsLookup.Lookup))
for k, v := range m.beaconsLookup.Lookup {
cp[k] = v
}
return cp
}

// BeaconExists checks if a beacon exists in the lookup


Loading…
取消
儲存