aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Net/SocketFactory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Common.Implementations/Net/SocketFactory.cs')
-rw-r--r--Emby.Common.Implementations/Net/SocketFactory.cs14
1 files changed, 2 insertions, 12 deletions
diff --git a/Emby.Common.Implementations/Net/SocketFactory.cs b/Emby.Common.Implementations/Net/SocketFactory.cs
index 79310e017..1f41ffff5 100644
--- a/Emby.Common.Implementations/Net/SocketFactory.cs
+++ b/Emby.Common.Implementations/Net/SocketFactory.cs
@@ -46,21 +46,11 @@ namespace Emby.Common.Implementations.Net
socket.DualMode = true;
}
- return new NetSocket(socket, _logger);
+ return new NetSocket(socket, _logger, dualMode);
}
catch (SocketException ex)
{
- if (dualMode)
- {
- _logger.Error("Error creating dual mode socket: {0}. Will retry with ipv4-only.", ex.SocketErrorCode);
-
- if (ex.SocketErrorCode == SocketError.AddressFamilyNotSupported)
- {
- return CreateSocket(IpAddressFamily.InterNetwork, socketType, protocolType, false);
- }
- }
-
- throw;
+ throw new SocketCreateException(ex.SocketErrorCode.ToString(), ex);
}
}