@marcel91200 / caddy Mirror · read-only / commits / f29a9eee
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

caddytls: nil check on storageClean fields on Stop

Matthew Holt committed Oct 2, 2019 at 23:39 UTC f29a9eee0d062d7fb975d8779db4ea8a07d26f7d
1 file changed +6 -2
modules/caddytls/tls.go
+6 -2
@@ -159,8 +159,12 @@ func (t *TLS) Start() error {
159 // Stop stops the TLS module and cleans up any allocations.
160 func (t *TLS) Stop() error {
161 // stop the storage cleaner goroutine and ticker
162 - close(t.storageCleanStop)
163 - t.storageCleanTicker.Stop()
162 + if t.storageCleanStop != nil {
163 + close(t.storageCleanStop)
164 + }
165 + if t.storageCleanTicker != nil {
166 + t.storageCleanTicker.Stop()
167 + }
168 return nil
169 }
170