diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-08 01:54:16 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-08 01:54:16 -0500 |
| commit | 862018b5c20e27dc67619b8c0c212507685e8120 (patch) | |
| tree | 3afc3ec162582d6dfd5a9b6feb60caefca6d5f2d /Emby.Common.Implementations/Net/SocketFactory.cs | |
| parent | fa6b90eb745c2491ae50ce4fe1e2fb5700f87399 (diff) | |
| parent | 9ed3c311757a615ae32296da4b43f772370d1143 (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.cs | 14 |
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); } } |
