Skip to content

Commit

Permalink
Redis: prevent chain instance null refs downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCraver committed Mar 21, 2019
1 parent 8cbd9ad commit bb397e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Opserver.Core/Data/Redis/RedisInstance.Info.cs
Expand Up @@ -108,7 +108,7 @@ public List<RedisInstance> SlaveInstances
{ {
get 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 // If we can't poll this server, ONLY trust the other nodes we can poll
//return AllInstances.Where(i => i.Master == this).ToList(); //return AllInstances.Where(i => i.Master == this).ToList();
} }
Expand Down

0 comments on commit bb397e3

Please sign in to comment.