BaronGreenback 4 rokov pred
rodič
commit
eafb8cf652
1 zmenil súbory, kde vykonal 5 pridanie a 5 odobranie
  1. 5 5
      RSSDP/SsdpDeviceLocator.cs

+ 5 - 5
RSSDP/SsdpDeviceLocator.cs

@@ -27,14 +27,14 @@ namespace Rssdp.Infrastructure
         /// </summary>
         public SsdpDeviceLocator(ISsdpCommunicationsServer communicationsServer)
         {
-            if (communicationsServer == null)
+            _CommunicationsServer = communicationsServer;
+
+            if (communicationsServer != null)
             {
-                throw new ArgumentNullException(nameof(communicationsServer));
+                // This can occur is dlna is enabled, but defined to run over https.
+                _CommunicationsServer.ResponseReceived += CommsServer_ResponseReceived;
             }
 
-            _CommunicationsServer = communicationsServer;
-            _CommunicationsServer.ResponseReceived += CommsServer_ResponseReceived;
-
             _Devices = new List<DiscoveredSsdpDevice>();
         }