Skip to content

Commit

Permalink
noot
Browse files Browse the repository at this point in the history
  • Loading branch information
elee1766 committed Jun 24, 2024
1 parent 561a6e3 commit 25e086d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/caddytls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"runtime/debug"
"sync"
"time"
"unsafe"

"github.com/caddyserver/certmagic"
"go.uber.org/zap"
Expand Down Expand Up @@ -147,9 +146,7 @@ func (t *TLS) Provision(ctx caddy.Context) error {
certCacheMu.Lock()
if certCache == nil {
certCache = certmagic.NewCache(cacheOpts)
fmt.Println("creating cert cache", unsafe.Pointer(certCache))
} else {
fmt.Println("reusing cert cache", unsafe.Pointer(certCache))
certCache.SetOptions(cacheOpts)
}
certCacheMu.Unlock()
Expand Down Expand Up @@ -359,7 +356,6 @@ func (t *TLS) Stop() error {

// Cleanup frees up resources allocated during Provision.
func (t *TLS) Cleanup() error {
fmt.Println("cleanup called cert cache", unsafe.Pointer(certCache))
// stop the session ticket rotation goroutine
if t.SessionTickets != nil {
t.SessionTickets.stop()
Expand Down Expand Up @@ -405,7 +401,6 @@ func (t *TLS) Cleanup() error {

// remove the certs
certCacheMu.RLock()
fmt.Println("washing cert cache", unsafe.Pointer(certCache))
certCache.RemoveManaged(noLongerManaged)
certCache.Remove(noLongerLoaded)
certCacheMu.RUnlock()
Expand All @@ -422,7 +417,6 @@ func (t *TLS) Cleanup() error {
certCache.Stop()
certCacheMu.Lock()
certCache = nil
fmt.Println("deleting cert cache", unsafe.Pointer(certCache))
certCacheMu.Unlock()
}

Expand Down

0 comments on commit 25e086d

Please sign in to comment.