diff options
author | Matt Holt <[email protected]> | 2023-07-21 15:32:20 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-21 15:32:20 -0600 |
commit | b51dc5d5d0b8764165170af1f54b77d6de8cb5a1 (patch) | |
tree | d94262de1f318855c1cb723dd84ff4de3e96b6c4 /admin.go | |
parent | f857b32d65de882dbc945c94029849a7fc895e36 (diff) | |
download | caddy-b51dc5d5d0b8764165170af1f54b77d6de8cb5a1.tar.gz caddy-b51dc5d5d0b8764165170af1f54b77d6de8cb5a1.zip |
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.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, |