diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-14 15:18:01 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-14 15:18:01 -0500 |
| commit | 6d40ab7e1c40fdb5c18defb7a5f5521bbd0cfb2e (patch) | |
| tree | 19a2ca600c1c6a7df8eb9a649b94e0cc70086f4d /Emby.Common.Implementations | |
| parent | 08f959faba73e6ef66970276a43c5a7c807a6720 (diff) | |
| parent | 588c06fca037b6656d7b734b47f709a0e078ce41 (diff) | |
Merge branch 'beta' of https://github.com/MediaBrowser/Emby into beta
Diffstat (limited to 'Emby.Common.Implementations')
| -rw-r--r-- | Emby.Common.Implementations/IO/ManagedFileSystem.cs | 2 | ||||
| -rw-r--r-- | Emby.Common.Implementations/Net/SocketFactory.cs | 1 | ||||
| -rw-r--r-- | Emby.Common.Implementations/Net/UdpSocket.cs | 11 |
3 files changed, 4 insertions, 10 deletions
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.cs index 83bb50f94..4fb70d4e2 100644 --- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs @@ -61,7 +61,7 @@ namespace Emby.Common.Implementations.IO { get { - return Path.DirectorySeparatorChar; + return Path.PathSeparator; } } diff --git a/Emby.Common.Implementations/Net/SocketFactory.cs b/Emby.Common.Implementations/Net/SocketFactory.cs index f26137683..c65593242 100644 --- a/Emby.Common.Implementations/Net/SocketFactory.cs +++ b/Emby.Common.Implementations/Net/SocketFactory.cs @@ -131,6 +131,7 @@ namespace Emby.Common.Implementations.Net #else retVal.ExclusiveAddressUse = false; #endif + //retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true); retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, multicastTimeToLive); retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Parse(ipAddress), _LocalIP)); diff --git a/Emby.Common.Implementations/Net/UdpSocket.cs b/Emby.Common.Implementations/Net/UdpSocket.cs index eca82034b..b9b7d8a2d 100644 --- a/Emby.Common.Implementations/Net/UdpSocket.cs +++ b/Emby.Common.Implementations/Net/UdpSocket.cs @@ -63,7 +63,7 @@ namespace Emby.Common.Implementations.Net } }, state); #else - _Socket.BeginReceiveFrom(state.Buffer, 0, state.Buffer.Length, SocketFlags.None, ref state.EndPoint, new AsyncCallback(this.ProcessResponse), state); + _Socket.BeginReceiveFrom(state.Buffer, 0, state.Buffer.Length, SocketFlags.None, ref state.EndPoint, ProcessResponse, state); #endif return tcs.Task; @@ -99,7 +99,7 @@ namespace Emby.Common.Implementations.Net _Socket.EndSend(result); taskSource.TrySetResult(true); } - catch (SocketException ex) + catch (Exception ex) { taskSource.TrySetException(ex); } @@ -200,13 +200,6 @@ namespace Emby.Common.Implementations.Net { state.TaskCompletionSource.SetCanceled(); } - catch (SocketException se) - { - if (se.SocketErrorCode != SocketError.Interrupted && se.SocketErrorCode != SocketError.OperationAborted && se.SocketErrorCode != SocketError.Shutdown) - state.TaskCompletionSource.SetException(se); - else - state.TaskCompletionSource.SetCanceled(); - } catch (Exception ex) { state.TaskCompletionSource.SetException(ex); |
