Skip to content

Commit 47e4421

Browse files
authored
Merge pull request #36 from cnblogs/issue27
Use DefaultNodeLocator for multiple nodes
2 parents 465ef9b + f3dd015 commit 47e4421

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)