From e9a6fb74a0a059876fd2c4d8cf9a9f4b69d03106 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 27 Nov 2024 01:56:15 +0300 Subject: [PATCH] minor fixes --- redis.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redis.go b/redis.go index e561e88..dec322d 100755 --- a/redis.go +++ b/redis.go @@ -56,13 +56,16 @@ var ( ) type Store struct { - opts store.Options cli goredis.UniversalClient pool *pool.StringsPool connected *atomic.Bool + opts store.Options } func (r *Store) Connect(ctx context.Context) error { + if r.connected.Load() { + return nil + } if r.cli == nil { return store.ErrNotConnected }