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