The Free Software Media System - Server Backend & API
Make SonarCloud happy
Bond_0093623aafcb60d
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 6279ce5d0b..11fed24f7a 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -93,7 +93,6 @@ using MediaBrowser.Model.Serialization;using MediaBrowser.Model.Services;using MediaBrowser.Model.System;using MediaBrowser.Model.Tasks;-using MediaBrowser.Model.Updates;using MediaBrowser.Providers.Chapters;using MediaBrowser.Providers.Manager;using MediaBrowser.Providers.Plugins.TheTvdb;@@ -101,12 +100,10 @@ using MediaBrowser.Providers.Subtitles;using MediaBrowser.WebDashboard.Api;using MediaBrowser.XbmcMetadata.Providers;using Microsoft.AspNetCore.Http;-using Microsoft.AspNetCore.Http.Extensions;-using Microsoft.Extensions.Configuration;using Microsoft.Extensions.DependencyInjection;using Microsoft.Extensions.Logging;-using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;using Prometheus.DotNetRuntime;+using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;namespace Emby.Server.Implementations{diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.csindex e75140d6c0..7358c1a81d 100644--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs@@ -28,12 +28,11 @@ using Microsoft.AspNetCore.WebUtilities;using Microsoft.Extensions.Configuration;using Microsoft.Extensions.Hosting;using Microsoft.Extensions.Logging;-using Microsoft.Net.Http.Headers;using ServiceStack.Text.Jsv;namespace Emby.Server.Implementations.HttpServer{- public class HttpListenerHost : IHttpServer, IDisposable+ public class HttpListenerHost : IHttpServer{/// <summary>/// The key for a setting that specifies the default redirect path@@ -699,28 +698,6 @@ namespace Emby.Server.Implementations.HttpServerreturn _baseUrlPrefix + NormalizeUrlPath(path);}- /// <inheritdoc />- public void Dispose()- {- Dispose(true);- GC.SuppressFinalize(this);- }-- protected virtual void Dispose(bool disposing)- {- if (_disposed)- {- return;- }-- if (disposing)- {- // TODO:- }-- _disposed = true;- }-/// <summary>/// Processes the web socket message received./// </summary>diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.csindex 1af748ebc2..095725c504 100644--- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs+++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs@@ -36,8 +36,6 @@ namespace Emby.Server.Implementations.HttpServer/// </summary>private readonly WebSocket _socket;- private bool _disposed = false;-/// <summary>/// Initializes a new instance of the <see cref="WebSocketConnection" /> class./// </summary>@@ -221,12 +219,6 @@ namespace Emby.Server.Implementations.HttpServer};await OnReceive(info).ConfigureAwait(false);-- // Stop reading if there's no more data coming- if (result.IsCompleted)- {- return;- }}}}diff --git a/Emby.Server.Implementations/Session/WebSocketController.cs b/Emby.Server.Implementations/Session/WebSocketController.csindex c7ef9b1cec..a0274acd20 100644--- a/Emby.Server.Implementations/Session/WebSocketController.cs+++ b/Emby.Server.Implementations/Session/WebSocketController.cs@@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Sessionprivate readonly ISessionManager _sessionManager;private readonly SessionInfo _session;- private List<IWebSocketConnection> _sockets;+ private readonly List<IWebSocketConnection> _sockets;private bool _disposed = false;public WebSocketController(diff --git a/MediaBrowser.Controller/Net/IHttpServer.cs b/MediaBrowser.Controller/Net/IHttpServer.csindex 666ac1cfef..f1c4417613 100644--- a/MediaBrowser.Controller/Net/IHttpServer.cs+++ b/MediaBrowser.Controller/Net/IHttpServer.cs@@ -2,15 +2,14 @@ using System;using System.Collections.Generic;using System.Threading.Tasks;using MediaBrowser.Model.Events;-using MediaBrowser.Model.Services;using Microsoft.AspNetCore.Http;namespace MediaBrowser.Controller.Net{/// <summary>- /// Interface IHttpServer+ /// Interface IHttpServer./// </summary>- public interface IHttpServer : IDisposable+ public interface IHttpServer{/// <summary>/// Gets the URL prefix.