aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs b/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
index a91dbbe4c..e1f00951e 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
@@ -25,7 +25,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
/// <value>The web socket.</value>
private System.Net.WebSockets.WebSocket WebSocket { get; set; }
- private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
+ private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
/// <summary>
/// Initializes a new instance of the <see cref="NativeWebSocket" /> class.
@@ -168,7 +168,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
if (dispose)
{
_cancellationTokenSource.Cancel();
- _cancellationTokenSource.Dispose();
WebSocket.Dispose();
}