Skip to content

Commit

Permalink
fix issue with alert manager concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed May 15, 2023
1 parent 2af03d1 commit 4002745
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Application/Alerts/AlertManager.cs
Expand Up @@ -55,7 +55,7 @@ public IEnumerable<Alert.AlertState> RetrieveAlerts(EFClient client)
alerts = alerts.Concat(_states[client.ClientId].AsReadOnly());
}

return alerts.OrderByDescending(alert => alert.OccuredAt);
return alerts.OrderByDescending(alert => alert.OccuredAt).ToList();
}
finally
{
Expand Down
2 changes: 1 addition & 1 deletion SharedLibraryCore/BaseController.cs
Expand Up @@ -178,7 +178,7 @@ public override async void OnActionExecuting(ActionExecutingContext context)
ViewBag.ReportCount = Manager.GetServers().Sum(server =>
server.Reports.Count(report => DateTime.UtcNow - report.ReportedOn <= TimeSpan.FromHours(24)));
ViewBag.PermissionsSet = PermissionsSet;
ViewBag.Alerts = AlertManager.RetrieveAlerts(Client).ToList();
ViewBag.Alerts = AlertManager.RetrieveAlerts(Client);

base.OnActionExecuting(context);
}
Expand Down

0 comments on commit 4002745

Please sign in to comment.