diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-08-22 21:14:54 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-08-22 21:14:54 +0200 |
| commit | 18a311d32fd6e3cdfed466017bda46566a013106 (patch) | |
| tree | 3df6585a34945c5dd02edf98a0a826050e91b955 /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | d92e9ae85e41fef981729f544bfd6df2c052a712 (diff) | |
== null -> is null
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index dd90a8950..8b13ccada 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1006,7 +1006,7 @@ namespace Emby.Server.Implementations if (ConfigurationManager.GetNetworkConfiguration().EnablePublishedServerUriByRequest) { int? requestPort = request.Host.Port; - if (requestPort == null + if (requestPort is null || (requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase)) || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase))) { @@ -1190,7 +1190,7 @@ namespace Emby.Server.Implementations } } - if (_sessionManager != null) + if (_sessionManager is not null) { // used for closing websockets foreach (var session in _sessionManager.Sessions) |
