From 31d4a3445de11f06daf5da51d15824ae7dd9c665 Mon Sep 17 00:00:00 2001 From: Aaron Liu <912394456@qq.com> Date: Thu, 25 May 2023 19:44:59 +0800 Subject: [PATCH] fix(cache): panic if redis connection fails --- pkg/cache/redis.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cache/redis.go b/pkg/cache/redis.go index 08bf11e..e02bb48 100644 --- a/pkg/cache/redis.go +++ b/pkg/cache/redis.go @@ -66,8 +66,7 @@ func NewRedisStore(size int, network, address, password, database string) *Redis redis.DialPassword(password), ) if err != nil { - util.Log().Warning("Failed to create Redis connection: %s", err) - return nil, err + util.Log().Panic("Failed to create Redis connection: %s", err) } return c, nil },