diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-03-10 19:56:33 +0000 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-03-10 19:56:33 +0000 |
| commit | 1dd6036765f08892a39530ad73f5b046afbdaaaf (patch) | |
| tree | f487bde6e8797924739fb4c975ea993782c1ca18 /RSSDP/SsdpDeviceLocator.cs | |
| parent | 2f843b3b4885aa6c0397c560bf11cada7d17c5aa (diff) | |
Fixed false starts
Diffstat (limited to 'RSSDP/SsdpDeviceLocator.cs')
| -rw-r--r-- | RSSDP/SsdpDeviceLocator.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs index e2b524cf4..9a110683e 100644 --- a/RSSDP/SsdpDeviceLocator.cs +++ b/RSSDP/SsdpDeviceLocator.cs @@ -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>(); } |
