[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 tobi
commit f94da1a33c

View file

@ -145,8 +145,12 @@ func (c *Caches) Start() error {
func (c *Caches) Stop() {
log.Infof(nil, "stop: %p", c)
_ = c.Webfinger.Stop()
_ = c.StatusesFilterableFields.Stop()
if c.Webfinger != nil {
_ = c.Webfinger.Stop()
}
if c.StatusesFilterableFields != nil {
_ = c.StatusesFilterableFields.Stop()
}
}
// Sweep will sweep all the available caches to ensure none