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

Commit ee06f91

Browse files
committed
RedisSentinel tweak
1 parent 3d24935 commit ee06f91

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/ServiceStack.Redis/RedisSentinel.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ public string MasterName
4242
public RedisSentinel(string sentinelHost = null, string masterName = null)
4343
: this(new[] { sentinelHost ?? DefaultAddress }, masterName ?? DefaultMasterName) { }
4444

45-
public RedisSentinel(IEnumerable<string> sentinelHosts)
46-
: this(sentinelHosts, DefaultMasterName) { }
47-
48-
public RedisSentinel(IEnumerable<string> sentinelHosts, string masterName)
45+
public RedisSentinel(IEnumerable<string> sentinelHosts, string masterName = null)
4946
{
5047
this.sentinels = sentinelHosts != null ? sentinelHosts.ToList() : null;
5148
if (sentinelHosts == null || sentinels.Count == 0)
5249
throw new ArgumentException("sentinels must have at least one entry");
5350

54-
this.masterName = masterName;
51+
this.masterName = masterName ?? DefaultMasterName;
5552
this.RedisManagerFactory = new RedisManagerFactory();
5653
}
5754

0 commit comments

Comments
 (0)