Merge pull request #17411 from mbastian77/perf/session-manager-tolist

perf: avoid unnecessary list allocation in CheckForIdlePlayback
This commit is contained in:
Cody Robibero
2026-07-24 21:28:55 -04:00
committed by GitHub
@@ -641,8 +641,7 @@ namespace Emby.Server.Implementations.Session
if (playingSessions.Count > 0)
{
var idle = playingSessions
.Where(i => (DateTime.UtcNow - i.LastPlaybackCheckIn).TotalMinutes > 5)
.ToList();
.Where(i => (DateTime.UtcNow - i.LastPlaybackCheckIn).TotalMinutes > 5);
foreach (var session in idle)
{