aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/EndPointManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-24 15:52:19 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-24 15:52:19 -0400
commite441e2f53db0b587c9864fe91d7008a2344d147b (patch)
treec37b2148eb277671c7ee285c73b738542f279b22 /SocketHttpListener/Net/EndPointManager.cs
parent5e0f8fd8c486ac37e487786c10c2d3f9e1293ce8 (diff)
update active recordings
Diffstat (limited to 'SocketHttpListener/Net/EndPointManager.cs')
-rw-r--r--SocketHttpListener/Net/EndPointManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/SocketHttpListener/Net/EndPointManager.cs b/SocketHttpListener/Net/EndPointManager.cs
index 6a00ed360..ddb110ec1 100644
--- a/SocketHttpListener/Net/EndPointManager.cs
+++ b/SocketHttpListener/Net/EndPointManager.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Linq;
using System.Net;
using System.Reflection;
using System.Threading.Tasks;
@@ -83,7 +82,9 @@ namespace SocketHttpListener.Net
{
try
{
- addr = (await networkManager.GetHostAddressesAsync(host).ConfigureAwait(false)).FirstOrDefault() ??
+ var all = (await networkManager.GetHostAddressesAsync(host).ConfigureAwait(false));
+
+ addr = (all.Length == 0 ? null : all[0]) ??
GetIpAnyAddress(listener);
}
catch