summaryrefslogtreecommitdiff
path: root/admin.go
diff options
context:
space:
mode:
authorMatt Holt <mholt@users.noreply.github.com>2023-07-21 15:32:20 -0600
committerGitHub <noreply@github.com>2023-07-21 15:32:20 -0600
commitb51dc5d5d0b8764165170af1f54b77d6de8cb5a1 (patch)
treed94262de1f318855c1cb723dd84ff4de3e96b6c4 /admin.go
parentf857b32d65de882dbc945c94029849a7fc895e36 (diff)
core: Refine mutex during reloads (fix #5628) (#5645)
Separate currentCtxMu to protect currentCtx, and a new rawCfgMu to protect rawCfg and synchronize loads.
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/admin.go b/admin.go
index 3ea5051..4a1d23b 100644
--- a/admin.go
+++ b/admin.go
@@ -1016,9 +1016,9 @@ func handleConfigID(w http.ResponseWriter, r *http.Request) error {
id := parts[2]
// map the ID to the expanded path
- currentCtxMu.RLock()
+ rawCfgMu.RLock()
expanded, ok := rawCfgIndex[id]
- currentCtxMu.RUnlock()
+ rawCfgMu.RUnlock()
if !ok {
return APIError{
HTTPStatus: http.StatusNotFound,