|
|
|
@ -19,7 +19,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class WebSocketConnection.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class WebSocketConnection : IWebSocketConnection
|
|
|
|
|
public class WebSocketConnection : IWebSocketConnection, IDisposable
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The logger.
|
|
|
|
@ -119,7 +119,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
Memory<byte> memory = writer.GetMemory(512);
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
receiveresult = await _socket.ReceiveAsync(memory, cancellationToken);
|
|
|
|
|
receiveresult = await _socket.ReceiveAsync(memory, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
catch (WebSocketException ex)
|
|
|
|
|
{
|
|
|
|
@ -137,7 +137,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
writer.Advance(bytesRead);
|
|
|
|
|
|
|
|
|
|
// Make the data available to the PipeReader
|
|
|
|
|
FlushResult flushResult = await writer.FlushAsync();
|
|
|
|
|
FlushResult flushResult = await writer.FlushAsync().ConfigureAwait(false);
|
|
|
|
|
if (flushResult.IsCompleted)
|
|
|
|
|
{
|
|
|
|
|
// The PipeReader stopped reading
|
|
|
|
@ -223,7 +223,7 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
|
|
|
|
|
if (info.MessageType.Equals("KeepAlive", StringComparison.Ordinal))
|
|
|
|
|
{
|
|
|
|
|
await SendKeepAliveResponse();
|
|
|
|
|
await SendKeepAliveResponse().ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|