diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-10-25 12:47:20 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-11-22 16:15:31 +0100 |
| commit | b477b3874ef8d79a1e27f8bb298d38443c3ec425 (patch) | |
| tree | 9e2ce5032892e4c590cab63269081c413cbfdac7 /Emby.Server.Implementations/WebSockets/WebSocketManager.cs | |
| parent | 7846e9cb3cce026b81509454c8128cc7ca17c2f8 (diff) | |
Fix some warnings
Diffstat (limited to 'Emby.Server.Implementations/WebSockets/WebSocketManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/WebSockets/WebSocketManager.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/WebSockets/WebSocketManager.cs b/Emby.Server.Implementations/WebSockets/WebSocketManager.cs index 04c73ecea..efd97e4ff 100644 --- a/Emby.Server.Implementations/WebSockets/WebSocketManager.cs +++ b/Emby.Server.Implementations/WebSockets/WebSocketManager.cs @@ -39,12 +39,12 @@ namespace Emby.Server.Implementations.WebSockets do { var buffer = WebSocket.CreateServerBuffer(BufferSize); - result = await webSocket.ReceiveAsync(buffer, cancellationToken); + result = await webSocket.ReceiveAsync(buffer, cancellationToken).ConfigureAwait(false); message.AddRange(buffer.Array.Take(result.Count)); if (result.EndOfMessage) { - await ProcessMessage(message.ToArray(), taskCompletionSource); + await ProcessMessage(message.ToArray(), taskCompletionSource).ConfigureAwait(false); message.Clear(); } } while (!taskCompletionSource.Task.IsCompleted && @@ -53,8 +53,10 @@ namespace Emby.Server.Implementations.WebSockets if (webSocket.State == WebSocketState.Open) { - await webSocket.CloseAsync(result.CloseStatus ?? WebSocketCloseStatus.NormalClosure, - result.CloseStatusDescription, cancellationToken); + await webSocket.CloseAsync( + result.CloseStatus ?? WebSocketCloseStatus.NormalClosure, + result.CloseStatusDescription, + cancellationToken).ConfigureAwait(false); } } |
