caddytls: nil check on storageClean fields on Stop

This commit is contained in:
Matthew Holt 2019-10-02 23:39:32 -06:00
parent 370b78c5c7
commit f29a9eee0d
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -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
if t.storageCleanStop != nil {
close(t.storageCleanStop)
}
if t.storageCleanTicker != nil {
t.storageCleanTicker.Stop()
}
return nil
}