Skip to content

Commit f3dd015

Browse files
committed
Use DefaultNodeLocator for multiple nodes
1 parent 5198732 commit f3dd015

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Enyim.Caching/Configuration/MemcachedClientConfiguration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ public MemcachedClientConfiguration(
120120
}
121121
}
122122

123+
if(NodeLocator == null)
124+
{
125+
NodeLocator = options.Servers.Count > 1 ? typeof(DefaultNodeLocator) : typeof(SingleNodeLocator);
126+
}
127+
123128
if(options.Transcoder != null)
124129
{
125130
_transcoder = options.Transcoder;

0 commit comments

Comments
 (0)