Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6带端口 哨兵模式 报错 #482

Open
mxzhu opened this issue Jul 27, 2023 · 1 comment
Open

IPv6带端口 哨兵模式 报错 #482

mxzhu opened this issue Jul 27, 2023 · 1 comment

Comments

@mxzhu
Copy link

mxzhu commented Jul 27, 2023

rt,设置IPv6带端口 哨兵模式 报错
var csRedis1 = new CSRedis.CSRedisClient(
connectionString: cacheConfig.Redis.ConnectionString,
sentinels:new[]
{
"[fe80::5423:f83d:e19e:97fd%5]:26379",
"[fe80::5423:f83d:e19e:98fd%5]:26379",
"[fe80::5423:f83d:e19e:99fd%5]:26379"
});
具体是源码里面这里
public RedisSentinelManager(bool readOnly, params string[] sentinels)
{
_readOnly = readOnly;
_sentinels = new LinkedList<Tuple<string, int>>();
foreach (string text in sentinels)
{
string[] array = text.Split(new char[1] { ':' });
string host = array[0].Trim();
//报错 System.FormatException:“Input string was not in a correct format."
int port = int.Parse(array[1]);
Add(host, port);
}
}

@2881099
Copy link
Owner

2881099 commented Jul 27, 2023

建议切换到 FreeRedis,发布已经3年

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants