mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 00:35:26 +03:00
Use MinBy and MaxBy
This commit is contained in:
@@ -1256,8 +1256,7 @@ namespace Jellyfin.Networking.Manager
|
||||
// Look for the best internal address.
|
||||
bindAddress = addresses
|
||||
.Where(p => IsInLocalNetwork(p) && (p.Contains(source) || p.Equals(IPAddress.None)))
|
||||
.OrderBy(p => p.Tag)
|
||||
.FirstOrDefault()?.Address;
|
||||
.MinBy(p => p.Tag)?.Address;
|
||||
}
|
||||
|
||||
if (bindAddress is not null)
|
||||
|
||||
Reference in New Issue
Block a user