Apply review suggestions

This commit is contained in:
Shadowghost
2023-07-03 15:59:39 +02:00
parent 32ac3b580c
commit e233a3b074
4 changed files with 24 additions and 24 deletions

View File

@@ -475,8 +475,8 @@ namespace Emby.Server.Implementations
}
var networkConfiguration = ConfigurationManager.GetNetworkConfiguration();
HttpPort = networkConfiguration.ServerPortNumberHttp;
HttpsPort = networkConfiguration.ServerPortNumberHttps;
HttpPort = networkConfiguration.InternalHttpPort;
HttpsPort = networkConfiguration.InternalHttpsPort;
// Safeguard against invalid configuration
if (HttpPort == HttpsPort)
@@ -785,8 +785,8 @@ namespace Emby.Server.Implementations
if (HttpPort != 0 && HttpsPort != 0)
{
// Need to restart if ports have changed
if (networkConfiguration.ServerPortNumberHttp != HttpPort
|| networkConfiguration.ServerPortNumberHttps != HttpsPort)
if (networkConfiguration.InternalHttpPort != HttpPort
|| networkConfiguration.InternalHttpsPort != HttpsPort)
{
if (ConfigurationManager.Configuration.IsPortAuthorized)
{

View File

@@ -57,8 +57,8 @@ namespace Emby.Server.Implementations.EntryPoints
return new StringBuilder(32)
.Append(config.EnableUPnP).Append(Separator)
.Append(config.PublicPortHttp).Append(Separator)
.Append(config.PublicPortHttps).Append(Separator)
.Append(config.PublicHttpPort).Append(Separator)
.Append(config.PublicHttpsPort).Append(Separator)
.Append(_appHost.HttpPort).Append(Separator)
.Append(_appHost.HttpsPort).Append(Separator)
.Append(_appHost.ListenWithHttps).Append(Separator)
@@ -146,11 +146,11 @@ namespace Emby.Server.Implementations.EntryPoints
private IEnumerable<Task> CreatePortMaps(INatDevice device)
{
var config = _config.GetNetworkConfiguration();
yield return CreatePortMap(device, _appHost.HttpPort, config.PublicPortHttp);
yield return CreatePortMap(device, _appHost.HttpPort, config.PublicHttpPort);
if (_appHost.ListenWithHttps)
{
yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicPortHttps);
yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicHttpsPort);
}
}