@ -166,9 +166,14 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
}
}
}
}
if(sentinels.isEmpty()){
if(cfg.isCheckSentinelsList()){
stopThreads();
if(sentinels.isEmpty()){
thrownewRedisConnectionException("At least two sentinels should be defined in Redis configuration! SENTINEL SENTINELS command returns empty result!");
stopThreads();
thrownewRedisConnectionException("SENTINEL SENTINELS command returns empty result! Set checkSentinelsList = false to avoid this check.");
}elseif(sentinels.size()<2){
stopThreads();
thrownewRedisConnectionException("SENTINEL SENTINELS command returns less than 2 nodes! At least two sentinels should be defined in Redis configuration. Set checkSentinelsList = false to avoid this check.");