This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,19 @@ namespace ServiceStack.Redis
1818{
1919 public class RedisSentinel : IRedisSentinel
2020 {
21+ private readonly string sentinelName ;
2122 private int failures = 0 ;
2223 private int sentinelIndex = - 1 ;
2324 private List < string > sentinels ;
2425 private RedisSentinelWorker worker ;
2526 private PooledRedisClientManager clientManager ;
2627 private static int MaxFailures = 5 ;
2728
28- public RedisSentinel ( IEnumerable < string > sentinelHosts )
29+ public RedisSentinel ( IEnumerable < string > sentinelHosts , string sentinelName )
2930 {
3031 if ( sentinelHosts == null || sentinelHosts . Count ( ) == 0 ) throw new ArgumentException ( "sentinels must have at least one entry" ) ;
3132
33+ this . sentinelName = sentinelName ;
3234 this . sentinels = new List < string > ( sentinelHosts ) ;
3335 }
3436
@@ -80,7 +82,7 @@ private RedisSentinelWorker GetNextSentinel()
8082 sentinelIndex = 0 ;
8183 }
8284
83- var sentinelWorker = new RedisSentinelWorker ( sentinels [ sentinelIndex ] , "mymaster" , this . clientManager ) ;
85+ var sentinelWorker = new RedisSentinelWorker ( sentinels [ sentinelIndex ] , this . sentinelName , this . clientManager ) ;
8486
8587 sentinelWorker . SentinelError += Worker_SentinelError ;
8688 return sentinelWorker ;
You can’t perform that action at this time.
0 commit comments