summaryrefslogtreecommitdiffhomepage
path: root/admin.go
diff options
context:
space:
mode:
authorMatt Holt <[email protected]>2022-08-01 13:36:22 -0600
committerGitHub <[email protected]>2022-08-01 13:36:22 -0600
commitf783290f40febd3eef2a299911ad95bab4d2b414 (patch)
tree1baed0987f2ad5ed723dbda671f0eec13a414ca7 /admin.go
parentebd6abcbd5f6b31b7b4cadca0a546d9f0eab9ad3 (diff)
downloadcaddy-f783290f40febd3eef2a299911ad95bab4d2b414.tar.gz
caddy-f783290f40febd3eef2a299911ad95bab4d2b414.zip
caddyhttp: Implement `caddy respond` command (#4870)
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/admin.go b/admin.go
index 670a27017..125a7b2ef 100644
--- a/admin.go
+++ b/admin.go
@@ -993,9 +993,9 @@ func handleConfigID(w http.ResponseWriter, r *http.Request) error {
id := parts[2]
// map the ID to the expanded path
- currentCfgMu.RLock()
+ currentCtxMu.RLock()
expanded, ok := rawCfgIndex[id]
- defer currentCfgMu.RUnlock()
+ defer currentCtxMu.RUnlock()
if !ok {
return APIError{
HTTPStatus: http.StatusNotFound,
@@ -1030,7 +1030,7 @@ func handleStop(w http.ResponseWriter, r *http.Request) error {
// the operation at path according to method, using body and out as
// needed. This is a low-level, unsynchronized function; most callers
// will want to use changeConfig or readConfig instead. This requires a
-// read or write lock on currentCfgMu, depending on method (GET needs
+// read or write lock on currentCtxMu, depending on method (GET needs
// only a read lock; all others need a write lock).
func unsyncedConfigAccess(method, path string, body []byte, out io.Writer) error {
var err error