Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit c94eedd

Browse files
committed
fix host index to look at Host.Count instead of client.Length
1 parent 223c98f commit c94eedd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceStack.Redis/RedisManagerPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public IRedisClient GetClient()
123123
while ((inActiveClient = GetInActiveClient()) == null)
124124
{
125125
//Create new client outside of pool when max pool size exceeded
126-
var nextIndex = poolIndex % clients.Length;
126+
var nextIndex = poolIndex % Hosts.Count;
127127
var nextHost = Hosts[nextIndex];
128128
var newClient = InitNewClient(nextHost);
129129
//Don't handle callbacks for new client outside pool

0 commit comments

Comments
 (0)