aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs
diff options
context:
space:
mode:
authorClaus Vium <clausvium@gmail.com>2019-02-27 21:40:47 +0100
committerClaus Vium <clausvium@gmail.com>2019-02-27 21:40:47 +0100
commite47d12198556abfbfb57d2c1a9e45f6f7230bf63 (patch)
tree84840db902c026ef0679c390590193d4da8fc580 /Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs
parentc0b95dbc791acae1c28bf50fb3a33c06935e7192 (diff)
Fix websockets
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs')
-rw-r--r--Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs b/Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs
index dcbfb8048..eebbe8b78 100644
--- a/Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs
+++ b/Emby.Server.Implementations/SocketSharp/SharpWebSocket.cs
@@ -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;