From d0157ce6ae073db38e18222520eaeeaa3675fdfd Mon Sep 17 00:00:00 2001 From: blazSmehov Date: Thu, 7 May 2026 11:08:18 +0200 Subject: [PATCH] fix: lock error --- internal/pkg/common/appcontext/context.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/pkg/common/appcontext/context.go b/internal/pkg/common/appcontext/context.go index be14349..329735b 100644 --- a/internal/pkg/common/appcontext/context.go +++ b/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