mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-26 20:16:33 +00:00
Remove unnecessary foreach loop
This commit is contained in:
@@ -1187,13 +1187,12 @@ namespace Emby.Server.Implementations
|
||||
{
|
||||
// Return the first matched address, if found, or the first known local address
|
||||
var addresses = await GetLocalIpAddressesInternal(false, 1, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
foreach (var address in addresses)
|
||||
if (addresses.Count == 0)
|
||||
{
|
||||
return GetLocalApiUrl(address);
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
return GetLocalApiUrl(addresses.First());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user