fix server restart
This commit is contained in:
parent
db7e78640a
commit
aa290062d6
|
@ -767,8 +767,6 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
{
|
||||
if (_disposed) return;
|
||||
|
||||
Dispose();
|
||||
|
||||
lock (_disposeLock)
|
||||
{
|
||||
if (_disposed) return;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -676,6 +676,7 @@ namespace MediaBrowser.ServerApplication
|
|||
|
||||
_appHostDisposed = true;
|
||||
_appHost.Dispose();
|
||||
_logger.Info("App host dispose complete");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user