summaryrefslogtreecommitdiff
path: root/modules/caddytls
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddytls')
-rw-r--r--modules/caddytls/tls.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go
index c4088ad..cb27a9e 100644
--- a/modules/caddytls/tls.go
+++ b/modules/caddytls/tls.go
@@ -159,8 +159,12 @@ func (t *TLS) Start() error {
// Stop stops the TLS module and cleans up any allocations.
func (t *TLS) Stop() error {
// stop the storage cleaner goroutine and ticker
- close(t.storageCleanStop)
- t.storageCleanTicker.Stop()
+ if t.storageCleanStop != nil {
+ close(t.storageCleanStop)
+ }
+ if t.storageCleanTicker != nil {
+ t.storageCleanTicker.Stop()
+ }
return nil
}