diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs index 84d78d3fb6..68fd2453e3 100644 --- a/Jellyfin.Server/CoreAppHost.cs +++ b/Jellyfin.Server/CoreAppHost.cs @@ -47,15 +47,6 @@ namespace Jellyfin.Server protected override void ShutdownInternal() => Program.Shutdown(); protected override IHttpListener CreateHttpListener() - => new WebSocketSharpListener( - Logger, - Certificate, - StreamHelper, - NetworkManager, - SocketFactory, - CryptographyProvider, - SupportsDualModeSockets, - FileSystemManager, - EnvironmentInfo); + => new WebSocketSharpListener(Logger); } } diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs index 64856f04af..c458fdb78f 100644 --- a/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs +++ b/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs @@ -1,18 +1,12 @@ using System; using System.Collections.Generic; using System.Net; - using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; using Emby.Server.Implementations.HttpServer; using Emby.Server.Implementations.Net; -using MediaBrowser.Common.Net; using MediaBrowser.Controller.Net; -using MediaBrowser.Model.Cryptography; -using MediaBrowser.Model.IO; -using MediaBrowser.Model.Net; using MediaBrowser.Model.Services; -using MediaBrowser.Model.System; using Microsoft.Extensions.Logging; namespace Jellyfin.Server.SocketSharp @@ -22,38 +16,14 @@ using Microsoft.Extensions.Logging; private HttpListener _listener; private readonly ILogger _logger; - private readonly X509Certificate _certificate; - private readonly IStreamHelper _streamHelper; - private readonly INetworkManager _networkManager; - private readonly ISocketFactory _socketFactory; - private readonly ICryptoProvider _cryptoProvider; - private readonly IFileSystem _fileSystem; - private readonly bool _enableDualMode; - private readonly IEnvironmentInfo _environment; private CancellationTokenSource _disposeCancellationTokenSource = new CancellationTokenSource(); private CancellationToken _disposeCancellationToken; public WebSocketSharpListener( - ILogger logger, - X509Certificate certificate, - IStreamHelper streamHelper, - INetworkManager networkManager, - ISocketFactory socketFactory, - ICryptoProvider cryptoProvider, - bool enableDualMode, - IFileSystem fileSystem, - IEnvironmentInfo environment) + ILogger logger) { _logger = logger; - _certificate = certificate; - _streamHelper = streamHelper; - _networkManager = networkManager; - _socketFactory = socketFactory; - _cryptoProvider = cryptoProvider; - _enableDualMode = enableDualMode; - _fileSystem = fileSystem; - _environment = environment; _disposeCancellationToken = _disposeCancellationTokenSource.Token; }