Merge pull request #17411 from mbastian77/perf/session-manager-tolist
perf: avoid unnecessary list allocation in CheckForIdlePlayback
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user