aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Net/SocketFactory.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-03-17 16:25:15 -0400
committerGitHub <noreply@github.com>2017-03-17 16:25:15 -0400
commit66a886adeffe40f41b1353d14fe8559ea134b83f (patch)
tree30052119272e0778ec887e60458f1d4e779c9e8e /Emby.Common.Implementations/Net/SocketFactory.cs
parent2928c753e24ae60024a63c8ea0d0b7f2b68a6383 (diff)
parent3dcaeea20c3a7055dd8759e351d30c591ce1360d (diff)
Merge pull request #2532 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Common.Implementations/Net/SocketFactory.cs')
-rw-r--r--Emby.Common.Implementations/Net/SocketFactory.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Emby.Common.Implementations/Net/SocketFactory.cs b/Emby.Common.Implementations/Net/SocketFactory.cs
index 0f4306a6b..1fd367afb 100644
--- a/Emby.Common.Implementations/Net/SocketFactory.cs
+++ b/Emby.Common.Implementations/Net/SocketFactory.cs
@@ -52,6 +52,18 @@ namespace Emby.Common.Implementations.Net
{
throw new SocketCreateException(ex.SocketErrorCode.ToString(), ex);
}
+ catch (ArgumentException ex)
+ {
+ if (dualMode)
+ {
+ // Mono for BSD incorrectly throws ArgumentException instead of SocketException
+ throw new SocketCreateException("AddressFamilyNotSupported", ex);
+ }
+ else
+ {
+ throw;
+ }
+ }
}
public ISocket CreateTcpSocket(IpAddressInfo remoteAddress, int remotePort)