aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Net/SocketFactory.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-08 01:54:16 -0500
committerGitHub <noreply@github.com>2016-12-08 01:54:16 -0500
commit862018b5c20e27dc67619b8c0c212507685e8120 (patch)
tree3afc3ec162582d6dfd5a9b6feb60caefca6d5f2d /Emby.Common.Implementations/Net/SocketFactory.cs
parentfa6b90eb745c2491ae50ce4fe1e2fb5700f87399 (diff)
parent9ed3c311757a615ae32296da4b43f772370d1143 (diff)
Merge pull request #2333 from MediaBrowser/dev
Dev
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);
}
}