From 28634d3b366c814192a14970e5f790d6cae149bf Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Thu, 24 Sep 2020 15:43:06 +0100 Subject: [PATCH] Update DlnaEntryPoint.cs --- Emby.Dlna/Main/DlnaEntryPoint.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index 35ec15623c..6f626711a2 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -259,15 +259,16 @@ namespace Emby.Dlna.Main private void RegisterServerEndpoints() { - var bindAddresses = _networkManager.GetInternalBindAddresses() - .Where(i => i.AddressFamily == AddressFamily.InterNetwork || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0)); - var udn = CreateUuid(_appHost.SystemId); - if (!bindAddresses.Any()) + var ba = new NetCollection( + _networkManager.GetInternalBindAddresses() + .Where(i => i.AddressFamily == AddressFamily.InterNetwork || (i.AddressFamily == AddressFamily.InterNetworkV6 && i.Address.ScopeId != 0))); + + if (ba.Count == 0) { // No interfaces returned, so use loopback. - bindAddresses = _networkManager.GetLoopbacks(); + ba = _networkManager.GetLoopbacks(); } foreach (var addr in bindAddresses)