aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener.Portable
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-21 15:24:41 -0500
committerGitHub <noreply@github.com>2016-12-21 15:24:41 -0500
commit9782f5665ca3d65a8c35aff911cedd49fa38709c (patch)
tree6fc62453e0470c770c78a5e2679848eba6aa4378 /SocketHttpListener.Portable
parentf54ed748376184b3d5f4100ad8c64cef732c226a (diff)
parentef671725559ef394337343af510ecb557b700d17 (diff)
Merge pull request #2362 from MediaBrowser/beta
Beta
Diffstat (limited to 'SocketHttpListener.Portable')
-rw-r--r--SocketHttpListener.Portable/Net/EndPointListener.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/SocketHttpListener.Portable/Net/EndPointListener.cs b/SocketHttpListener.Portable/Net/EndPointListener.cs
index 690dedd09..2bd7a3da6 100644
--- a/SocketHttpListener.Portable/Net/EndPointListener.cs
+++ b/SocketHttpListener.Portable/Net/EndPointListener.cs
@@ -71,7 +71,10 @@ namespace SocketHttpListener.Net
}
catch (SocketCreateException ex)
{
- if (_enableDualMode && endpoint.IpAddress.Equals(IpAddressInfo.IPv6Any) && string.Equals(ex.ErrorCode, "AddressFamilyNotSupported", StringComparison.OrdinalIgnoreCase))
+ if (_enableDualMode && endpoint.IpAddress.Equals(IpAddressInfo.IPv6Any) &&
+ (string.Equals(ex.ErrorCode, "AddressFamilyNotSupported", StringComparison.OrdinalIgnoreCase) ||
+ // mono on bsd is throwing this
+ string.Equals(ex.ErrorCode, "ProtocolNotSupported", StringComparison.OrdinalIgnoreCase)))
{
endpoint = new IpEndPointInfo(IpAddressInfo.Any, endpoint.Port);
_enableDualMode = false;