summaryrefslogtreecommitdiff
path: root/modules/caddytls
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-10-02 23:39:32 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-10-02 23:39:32 -0600
commitf29a9eee0d062d7fb975d8779db4ea8a07d26f7d (patch)
treebdfe79e7afac9ab454a4a9188303641346ad6477 /modules/caddytls
parent370b78c5c77404620523d6036d08716402fbf709 (diff)
caddytls: nil check on storageClean fields on Stop
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
}