mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-14 19:02:14 +08:00
Separate currentCtxMu to protect currentCtx, and a new rawCfgMu to protect rawCfg and synchronize loads.
This commit is contained in:
4
admin.go
4
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,
|
||||
|
Reference in New Issue
Block a user