fix server restart

This commit is contained in:
Luke Pulverenti 2017-02-16 02:13:32 -05:00
parent db7e78640a
commit aa290062d6
3 changed files with 5 additions and 2 deletions

View File

@ -767,8 +767,6 @@ namespace Emby.Server.Implementations.HttpServer
{
if (_disposed) return;
Dispose();
lock (_disposeLock)
{
if (_disposed) return;

View File

@ -303,6 +303,7 @@ namespace Emby.Server.Implementations.ServerManager
/// </summary>
private void DisposeHttpServer()
{
_logger.Info("Disposing web socket connections");
foreach (var socket in _webSocketConnections)
{
// Dispose the connection
@ -314,6 +315,9 @@ namespace Emby.Server.Implementations.ServerManager
if (HttpServer != null)
{
HttpServer.WebSocketConnected -= HttpServer_WebSocketConnected;
_logger.Info("Disposing http server");
HttpServer.Dispose();
}
}

View File

@ -676,6 +676,7 @@ namespace MediaBrowser.ServerApplication
_appHostDisposed = true;
_appHost.Dispose();
_logger.Info("App host dispose complete");
}
}