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

Commit 4d51a8e

Browse files
committed
throw when no master is available
1 parent 319aaae commit 4d51a8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ServiceStack.Redis/RedisSentinelWorker.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ private void SentinelMessageReceived(string channel, string message)
6767
internal SentinelInfo GetSentinelInfo()
6868
{
6969
var masterHost = GetMasterHostInternal(sentinel.MasterName);
70+
if (masterHost == null)
71+
throw new RedisException("Redis Sentinel is reporting no master is available");
72+
7073
var sentinelInfo = new SentinelInfo(
7174
sentinel.MasterName,
7275
new[] { masterHost },

0 commit comments

Comments
 (0)