From 95ab8b97da0697117e635c42a91eaa379d435228 Mon Sep 17 00:00:00 2001 From: keven1024 Date: Sat, 4 Apr 2026 21:21:27 +0800 Subject: [PATCH] refactor(pkg): ensure Redis client initialization is properly assigned during concurrent access --- pkg/utils/redis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/utils/redis.go b/pkg/utils/redis.go index 308a622..c7fc169 100644 --- a/pkg/utils/redis.go +++ b/pkg/utils/redis.go @@ -27,7 +27,7 @@ func InitRedis() rueidis.Client { func GetRedisClient() (rueidis.Client, context.Context) { onceRedis.Do(func() { - InitRedis() + rdb = InitRedis() }) return rdb, ctx }