The Free Software Media System - Server Backend & API
Remove unnecessary foreach loop
Mark Monteiro15fd4812f092
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex edfed67a18..8f20a4921f 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -1187,13 +1187,12 @@ namespace Emby.Server.Implementations{// Return the first matched address, if found, or the first known local addressvar 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){