aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener.Portable/Net/EndPointListener.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-20 15:00:51 -0500
committerGitHub <noreply@github.com>2016-12-20 15:00:51 -0500
commitb4575306b8d407d967da928f9a6de97e52524459 (patch)
tree8c05d7396745baa5901cd1ee2715dc86614854eb /SocketHttpListener.Portable/Net/EndPointListener.cs
parentc15acd0ebc9de14b6be82d30c53eeb9f499a9cdc (diff)
parent7f7be26771bbc221dada2a9395da8182b512dd6c (diff)
Merge pull request #2360 from MediaBrowser/dev
Dev
Diffstat (limited to 'SocketHttpListener.Portable/Net/EndPointListener.cs')
-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;