[bugfix] Avoid nil ptr if maintenance router can't be started (#3919)

This commit is contained in:
tobi
2025-03-18 13:32:08 +01:00
committed by GitHub
parent 59aac290e4
commit 657e064bf6

View File

@@ -144,9 +144,13 @@ func (c *Caches) Start() error {
func (c *Caches) Stop() { func (c *Caches) Stop() {
log.Infof(nil, "stop: %p", c) log.Infof(nil, "stop: %p", c)
if c.Webfinger != nil {
_ = c.Webfinger.Stop() _ = c.Webfinger.Stop()
}
if c.StatusesFilterableFields != nil {
_ = c.StatusesFilterableFields.Stop() _ = c.StatusesFilterableFields.Stop()
} }
}
// Sweep will sweep all the available caches to ensure none // Sweep will sweep all the available caches to ensure none
// are above threshold percent full to their total capacity. // are above threshold percent full to their total capacity.