summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-18 13:32:08 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-18 13:32:08 +0100
commit657e064bf6d619d836825c0ad56bb791875d102a (patch)
tree1fc2b8d9d6be09f8b0713816a0439a98ffca7447
parent[performance] reindex public timeline + tinker with query a bit (#3918) (diff)
downloadgotosocial-657e064bf6d619d836825c0ad56bb791875d102a.tar.xz
[bugfix] Avoid nil ptr if maintenance router can't be started (#3919)
-rw-r--r--internal/cache/cache.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go
index 88e4f870a..7844c03f8 100644
--- a/internal/cache/cache.go
+++ b/internal/cache/cache.go
@@ -144,8 +144,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