From ee4cc96b2c4cc0023c540b5f4a489267b9a0106d Mon Sep 17 00:00:00 2001 From: RogueException Date: Wed, 17 Aug 2016 11:53:32 -0300 Subject: [PATCH] DefaultWebSocketClient's internal methods should not use a canceltoken on locks --- src/Discord.Net/Net/WebSockets/DefaultWebsocketClient.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Discord.Net/Net/WebSockets/DefaultWebsocketClient.cs b/src/Discord.Net/Net/WebSockets/DefaultWebsocketClient.cs index 67754843c2..51464efd37 100644 --- a/src/Discord.Net/Net/WebSockets/DefaultWebsocketClient.cs +++ b/src/Discord.Net/Net/WebSockets/DefaultWebsocketClient.cs @@ -51,7 +51,7 @@ public void Dispose() public async Task ConnectAsync(string host) { - await _sendLock.WaitAsync(_cancelToken).ConfigureAwait(false); + await _sendLock.WaitAsync().ConfigureAwait(false); try { await ConnectInternalAsync(host); @@ -83,7 +83,7 @@ private async Task ConnectInternalAsync(string host) public async Task DisconnectAsync() { - await _sendLock.WaitAsync(_cancelToken).ConfigureAwait(false); + await _sendLock.WaitAsync().ConfigureAwait(false); try { await DisconnectInternalAsync(); @@ -118,7 +118,7 @@ public void SetCancelToken(CancellationToken cancelToken) public async Task SendAsync(byte[] data, int index, int count, bool isText) { - await _sendLock.WaitAsync(_cancelToken).ConfigureAwait(false); + await _sendLock.WaitAsync().ConfigureAwait(false); try { if (_client == null) return;