diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /Mono.Nat/Upnp/Searchers/UpnpSearcher.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'Mono.Nat/Upnp/Searchers/UpnpSearcher.cs')
| -rw-r--r-- | Mono.Nat/Upnp/Searchers/UpnpSearcher.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs b/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs index d9b16dd81..7c1e89d3b 100644 --- a/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs +++ b/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs @@ -46,7 +46,6 @@ namespace Mono.Nat internal class UpnpSearcher : ISearcher { public event EventHandler<DeviceEventArgs> DeviceFound; - public event EventHandler<DeviceEventArgs> DeviceLost; private DateTime nextSearch; private readonly ILogger _logger; @@ -64,8 +63,11 @@ namespace Mono.Nat public async Task Handle(IPAddress localAddress, UpnpDeviceInfo deviceInfo, IPEndPoint endpoint) { - // No matter what, this method should never throw an exception. If something goes wrong - // we should still be in a position to handle the next reply correctly. + if (localAddress == null) + { + throw new ArgumentNullException("localAddress"); + } + try { /* For UPnP Port Mapping we need ot find either WANPPPConnection or WANIPConnection. @@ -82,7 +84,6 @@ namespace Mono.Nat // We have an internet gateway device now UpnpNatDevice d = new UpnpNatDevice(localAddress, deviceInfo, endpoint, string.Empty, _logger, _httpClient); - NatUtility.Log("Fetching service list: {0}", d.HostEndPoint); await d.GetServicesList().ConfigureAwait(false); OnDeviceFound(new DeviceEventArgs(d)); |
