aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Net/UdpSocket.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Common.Implementations/Net/UdpSocket.cs')
-rw-r--r--Emby.Common.Implementations/Net/UdpSocket.cs11
1 files changed, 2 insertions, 9 deletions
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);