reids cluster bug (#2986)

Co-authored-by: shaocongcong <shao.congcong@yalla.live>
This commit is contained in:
文豆芽
2023-03-09 21:37:34 +08:00
committed by GitHub
parent 37cb00d789
commit f8b2dc8c9f
2 changed files with 4 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package redis
import (
"crypto/tls"
"io"
"strings"
red "github.com/go-redis/redis/v8"
"github.com/zeromicro/go-zero/core/syncx"
@@ -19,7 +20,7 @@ func getCluster(r *Redis) (*red.ClusterClient, error) {
}
}
store := red.NewClusterClient(&red.ClusterOptions{
Addrs: []string{r.Addr},
Addrs: strings.Split(r.Addr, ","),
Password: r.Pass,
MaxRetries: maxRetries,
MinIdleConns: idleConns,