Skip to content
Permalink
Browse files

Redis: prevent chain instance null refs downstream

  • Loading branch information...
NickCraver committed Mar 21, 2019
1 parent 8cbd9ad commit bb397e3eb9033528c21e77ca3825eaace5d024fa
Showing with 1 addition and 1 deletion.
  1. +1 −1 Opserver.Core/Data/Redis/RedisInstance.Info.cs
@@ -108,7 +108,7 @@ public List<RedisInstance> SlaveInstances
{
get
{
return Info.LastPollSuccessful ? (Replication?.SlaveConnections.Select(s => s.GetServer()).ToList() ?? new List<RedisInstance>()) : new List<RedisInstance>();
return Info.LastPollSuccessful ? (Replication?.SlaveConnections.Select(s => s.GetServer()).Where(s => s != null).ToList() ?? new List<RedisInstance>()) : new List<RedisInstance>();
// If we can't poll this server, ONLY trust the other nodes we can poll
//return AllInstances.Where(i => i.Master == this).ToList();
}

0 comments on commit bb397e3

Please sign in to comment.
You can’t perform that action at this time.