aboutsummaryrefslogtreecommitdiff
path: root/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Mono.Nat/Upnp/Searchers/UpnpSearcher.cs')
-rw-r--r--Mono.Nat/Upnp/Searchers/UpnpSearcher.cs9
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));