aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs')
-rw-r--r--MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs13
1 files changed, 2 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs b/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
index 251083dc2..8be35071a 100644
--- a/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
+++ b/MediaBrowser.Server.Implementations/WebSocket/AlchemyServer.cs
@@ -50,8 +50,6 @@ namespace MediaBrowser.Server.Implementations.WebSocket
/// <value>The port.</value>
public int Port { get; private set; }
- private bool _hasStarted;
-
/// <summary>
/// Starts the specified port number.
/// </summary>
@@ -69,8 +67,6 @@ namespace MediaBrowser.Server.Implementations.WebSocket
};
WebSocketServer.Start();
-
- _hasStarted = true;
}
catch (Exception ex)
{
@@ -141,14 +137,9 @@ namespace MediaBrowser.Server.Implementations.WebSocket
{
if (WebSocketServer != null)
{
- if (_hasStarted)
- {
- _logger.Debug("Stopping alchemy server");
- WebSocketServer.Stop();
- }
-
+ // Calling dispose will also call stop
_logger.Debug("Disposing alchemy server");
- WebSocketServer.Dispose();
+ WebSocketServer.Stop();
WebSocketServer = null;
}
}