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 --- caddy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'caddy.go') diff --git a/caddy.go b/caddy.go index 84cfc11..dcaa86b 100644 --- a/caddy.go +++ b/caddy.go @@ -959,8 +959,9 @@ func Version() (simple, full string) { // This function is experimental and might be changed // or removed in the future. func ActiveContext() Context { - currentCtxMu.RLock() - defer currentCtxMu.RUnlock() + // TODO: This locking might still be needed; more investigation is required (deadlock during Cleanup for the caddytls.TLS module). + // currentCtxMu.RLock() + // defer currentCtxMu.RUnlock() return currentCtx } -- cgit v1.2.3