Fix websockets

This commit is contained in:
Claus Vium
2019-02-27 21:40:47 +01:00
parent c0b95dbc79
commit e47d121985
3 changed files with 16 additions and 15 deletions

View File

@@ -85,6 +85,11 @@ namespace Emby.Server.Implementations.SocketSharp
if (dispose)
{
_cancellationTokenSource.Cancel();
if (_webSocket.State == WebSocketState.Open)
{
_webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closed by client",
CancellationToken.None);
}
}
_disposed = true;