From 0e2c7e1d35b287fc0e56d6db2951f791e09b5a37 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Tue, 11 Jul 2023 13:10:58 -0600 Subject: caddytls: Reuse certificate cache through reloads (#5623) * caddytls: Don't purge cert cache on config reload * Update CertMagic This actually avoids reloading managed certs from storage when already in the cache, d'oh. * Fix bug; re-implement HasCertificateForSubject * Update go.mod: CertMagic tag --- admin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin.go') diff --git a/admin.go b/admin.go index 59b3dcd..3ea5051 100644 --- a/admin.go +++ b/admin.go @@ -1018,7 +1018,7 @@ func handleConfigID(w http.ResponseWriter, r *http.Request) error { // map the ID to the expanded path currentCtxMu.RLock() expanded, ok := rawCfgIndex[id] - defer currentCtxMu.RUnlock() + currentCtxMu.RUnlock() if !ok { return APIError{ HTTPStatus: http.StatusNotFound, -- cgit v1.2.3