mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-17 01:30:34 +00:00
caddytls: nil check on storageClean fields on Stop
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user