From 3bdcc0eba00d968ba77e9d644371164c9bc2695f Mon Sep 17 00:00:00 2001 From: kasnti Date: Tue, 1 Jul 2025 22:23:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:ClusterAdapter=E4=B8=AD=5FhostMappings?= =?UTF-8?q?=E5=9C=A8=E9=81=8D=E5=8E=86=E6=B7=BB=E5=8A=A0=E5=90=8E=E5=8F=88?= =?UTF-8?q?=E8=A2=AB=E9=87=8D=E6=96=B0=E8=B5=8B=E5=80=BC=EF=BC=9BRefershCl?= =?UTF-8?q?usterNodes=E6=96=B9=E6=B3=95=E5=90=8D=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/FreeRedis/RedisClient/Adapter/ClusterAdapter.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/FreeRedis/RedisClient/Adapter/ClusterAdapter.cs b/src/FreeRedis/RedisClient/Adapter/ClusterAdapter.cs index 4f65d03..bfb07f2 100644 --- a/src/FreeRedis/RedisClient/Adapter/ClusterAdapter.cs +++ b/src/FreeRedis/RedisClient/Adapter/ClusterAdapter.cs @@ -33,10 +33,9 @@ public ClusterAdapter(RedisClient topOwner, ConnectionStringBuilder[] clusterCon foreach (var kv in hostMappings) _hostMappings.Add(kv.Key, kv.Value); } - _hostMappings = hostMappings; _baseEncoding = _clusterConnectionStrings.FirstOrDefault()?.Encoding; _ib = new IdleBus(TimeSpan.FromMinutes(10)); - RefershClusterNodes(); + RefreshClusterNodes(); } bool isdisposed = false; @@ -281,7 +280,7 @@ async public override Task AdapterCallAsync(CommandPacket cmd, F } #endif - void RefershClusterNodes() + void RefreshClusterNodes() { Exception clusterException = null; foreach (var testConnection in _clusterConnectionStrings)