diff options
| author | Cody Robibero <cody@robibe.ro> | 2026-07-24 21:28:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-24 21:28:55 -0400 |
| commit | 700e53a807cdcfc1e8192014a8581ba30e2c0d6f (patch) | |
| tree | 555e8163ec5df5e7ead9ae44456842972d31469f | |
| parent | 88216e0ec4adc388a1db795f18fa8f4591ebc099 (diff) | |
| parent | fc0af1050912b94daa6c40455985cb61b12f4486 (diff) | |
Merge pull request #17411 from mbastian77/perf/session-manager-tolist
perf: avoid unnecessary list allocation in CheckForIdlePlayback
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 828bdd6859..5d62332552 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -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) { |
