diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index c65289e13..6fcdab874 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -767,8 +767,6 @@ namespace Emby.Server.Implementations.HttpServer { if (_disposed) return; - Dispose(); - lock (_disposeLock) { if (_disposed) return; diff --git a/Emby.Server.Implementations/ServerManager/ServerManager.cs b/Emby.Server.Implementations/ServerManager/ServerManager.cs index f7e4c0ce2..4c9228e54 100644 --- a/Emby.Server.Implementations/ServerManager/ServerManager.cs +++ b/Emby.Server.Implementations/ServerManager/ServerManager.cs @@ -303,6 +303,7 @@ namespace Emby.Server.Implementations.ServerManager /// 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(); } } diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 70b86c4a6..0e3f684b5 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -676,6 +676,7 @@ namespace MediaBrowser.ServerApplication _appHostDisposed = true; _appHost.Dispose(); + _logger.Info("App host dispose complete"); } }