From 1da677648f963342e883e7590d7f4d104e06428c Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Thu, 6 May 2021 17:15:09 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Alex Unger <6905948+refs@users.noreply.github.com> --- .../owncloud/ocs/handlers/apps/sharing/shares/shares.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index ebcc9a7895f..d44afed8d68 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -97,8 +97,10 @@ func (h *Handler) Init(c *config.Config) error { h.resourceInfoCache = gcache.New(c.ResourceInfoCacheSize).LFU().Build() if h.resourceInfoCacheTTL > 0 { - cwm, _ := getCacheWarmupManager(c) - go h.startCacheWarmup(cwm) + cwm, err := getCacheWarmupManager(c) + if err == nil { + go h.startCacheWarmup(cwm) + } } return nil