aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Common.Implementations')
-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)