mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-22 16:46:53 +01:00
caddytls: nil check on storageClean fields on Stop
This commit is contained in:
parent
370b78c5c7
commit
f29a9eee0d
1 changed files with 6 additions and 2 deletions
|
@ -159,8 +159,12 @@ func (t *TLS) Start() error {
|
||||||
// Stop stops the TLS module and cleans up any allocations.
|
// Stop stops the TLS module and cleans up any allocations.
|
||||||
func (t *TLS) Stop() error {
|
func (t *TLS) Stop() error {
|
||||||
// stop the storage cleaner goroutine and ticker
|
// stop the storage cleaner goroutine and ticker
|
||||||
close(t.storageCleanStop)
|
if t.storageCleanStop != nil {
|
||||||
t.storageCleanTicker.Stop()
|
close(t.storageCleanStop)
|
||||||
|
}
|
||||||
|
if t.storageCleanTicker != nil {
|
||||||
|
t.storageCleanTicker.Stop()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue