Correct use of local variable wanAddress.

pull/1151/head
Phlogi 6 years ago committed by GitHub
parent 1b03f078b9
commit 122cba2aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1373,13 +1373,15 @@ namespace Emby.Server.Implementations
{ {
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false); var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
string wanAddress;
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns)) if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
{ {
var wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false); wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
} }
else else
{ {
var wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns); wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
} }
return new SystemInfo return new SystemInfo
@ -1431,13 +1433,15 @@ namespace Emby.Server.Implementations
{ {
var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false); var localAddress = await GetLocalApiUrl(cancellationToken).ConfigureAwait(false);
string wanAddress;
if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns)) if (string.IsNullOrEmpty(ServerConfigurationManager.Configuration.WanDdns))
{ {
var wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false); wanAddress = await GetWanApiUrlFromExternal(cancellationToken).ConfigureAwait(false);
} }
else else
{ {
var wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns); wanAddress = GetWanApiUrl(ServerConfigurationManager.Configuration.WanDdns);
} }
return new PublicSystemInfo return new PublicSystemInfo
{ {

Loading…
Cancel
Save