mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-06 10:22:04 +01:00
Use MinBy and MaxBy
This commit is contained in:
@@ -69,9 +69,7 @@ namespace Emby.Server.Implementations.Session
|
||||
T data,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var socket = GetActiveSockets()
|
||||
.OrderByDescending(i => i.LastActivityDate)
|
||||
.FirstOrDefault();
|
||||
var socket = GetActiveSockets().MaxBy(i => i.LastActivityDate);
|
||||
|
||||
if (socket is null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user