This commit is contained in:
Luke Pulverenti
2017-07-25 14:32:03 -04:00
parent fe82a8a872
commit a46840534f
7 changed files with 123 additions and 51 deletions

View File

@@ -37,8 +37,6 @@ namespace Emby.Common.Implementations.Net
private TaskCompletionSource<SocketReceiveResult> _currentReceiveTaskCompletionSource;
private TaskCompletionSource<int> _currentSendTaskCompletionSource;
private readonly SemaphoreSlim _sendLock = new SemaphoreSlim(1, 1);
public UdpSocket(Socket socket, int localPort, IPAddress ip)
{
if (socket == null) throw new ArgumentNullException("socket");
@@ -234,8 +232,6 @@ namespace Emby.Common.Implementations.Net
if (socket != null)
socket.Dispose();
_sendLock.Dispose();
var tcs = _currentReceiveTaskCompletionSource;
if (tcs != null)
{