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 }