Merge branch 'fix/thread-safety-json-unmarshal' into 'main'

fix: change to write lock for thread safety in json unmarshal

See merge request unboundsoftware/shiny/authz_client!239
This commit was merged in pull request #242.
This commit is contained in:
2025-11-02 22:09:18 +01:00
+2 -2
View File
@@ -67,8 +67,8 @@ func (h *PrivilegeHandler) Fetch() error {
return err
}
h.RLock()
defer h.RUnlock()
h.Lock()
defer h.Unlock()
err = json.Unmarshal(buff, &h.privileges)
if err != nil {
return err