From ec4ac2b8e95e51db4031e87ba44c258d5566961a Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Wed, 29 Mar 2023 21:43:11 +0200 Subject: [PATCH] fix(redis): set ConnMaxIdleTime, not ConnMaxLifetime --- pkg/config/redis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/redis.go b/pkg/config/redis.go index 19961d8..0acc008 100644 --- a/pkg/config/redis.go +++ b/pkg/config/redis.go @@ -39,7 +39,7 @@ func (r *Redis) Client() (*redis.Client, error) { } if r.ConnectionIdleTimeout > 0 { - opts.ConnMaxLifetime = time.Duration(r.ConnectionIdleTimeout) * time.Second + opts.ConnMaxIdleTime = time.Duration(r.ConnectionIdleTimeout) * time.Second } else if r.ConnectionIdleTimeout == -1 { opts.ConnMaxIdleTime = -1 }