summaryrefslogtreecommitdiff
path: root/modules/caddypki
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddypki')
-rw-r--r--modules/caddypki/maintain.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/caddypki/maintain.go b/modules/caddypki/maintain.go
index 2fce0d9..c0b277d 100644
--- a/modules/caddypki/maintain.go
+++ b/modules/caddypki/maintain.go
@@ -17,12 +17,20 @@ package caddypki
import (
"crypto/x509"
"fmt"
+ "log"
+ "runtime/debug"
"time"
"go.uber.org/zap"
)
func (p *PKI) maintenance() {
+ defer func() {
+ if err := recover(); err != nil {
+ log.Printf("[PANIC] PKI maintenance: %v\n%s", err, debug.Stack())
+ }
+ }()
+
ticker := time.NewTicker(10 * time.Minute) // TODO: make configurable
defer ticker.Stop()