diff options
| author | 2025-03-18 13:32:08 +0100 | |
|---|---|---|
| committer | 2025-03-18 13:32:08 +0100 | |
| commit | 657e064bf6d619d836825c0ad56bb791875d102a (patch) | |
| tree | 1fc2b8d9d6be09f8b0713816a0439a98ffca7447 /internal | |
| parent | [performance] reindex public timeline + tinker with query a bit (#3918) (diff) | |
| download | gotosocial-657e064bf6d619d836825c0ad56bb791875d102a.tar.xz | |
[bugfix] Avoid nil ptr if maintenance router can't be started (#3919)
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/cache/cache.go | 8 |
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 |
