mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-23 10:23:13 +08:00
mac dns problem
This commit is contained in:
@@ -1121,7 +1121,7 @@ namespace Opc.Ua.Configuration
|
||||
string computerName = Utils.GetHostName();
|
||||
|
||||
// get IP addresses.
|
||||
IPAddress[] addresses = await Utils.GetHostAddresses(computerName);
|
||||
IPAddress[] addresses = null;
|
||||
|
||||
for (int ii = 0; ii < serverDomainNames.Count; ii++)
|
||||
{
|
||||
@@ -1140,6 +1140,12 @@ namespace Opc.Ua.Configuration
|
||||
// check for aliases.
|
||||
bool found = false;
|
||||
|
||||
// get IP addresses only if necessary.
|
||||
if (addresses == null)
|
||||
{
|
||||
addresses = await Utils.GetHostAddresses(computerName);
|
||||
}
|
||||
|
||||
// check for ip addresses.
|
||||
for (int jj = 0; jj < addresses.Length; jj++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user