diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-10-02 23:39:32 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-10-02 23:39:32 -0600 |
commit | f29a9eee0d062d7fb975d8779db4ea8a07d26f7d (patch) | |
tree | bdfe79e7afac9ab454a4a9188303641346ad6477 | |
parent | 370b78c5c77404620523d6036d08716402fbf709 (diff) |
caddytls: nil check on storageClean fields on Stop
-rw-r--r-- | modules/caddytls/tls.go | 8 |
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 } |