mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Fixed DNS resolve bug for Grid mode on multi-Homer systems.
This commit is contained in:
@@ -249,6 +249,13 @@ namespace OpenSim.Framework.Utilities
|
||||
/// <returns>An IP address, or null</returns>
|
||||
public static IPAddress GetHostFromDNS(string dnsAddress)
|
||||
{
|
||||
|
||||
// Is it already a valid IP? No need to look it up.
|
||||
IPAddress ipa;
|
||||
if (IPAddress.TryParse(dnsAddress, out ipa))
|
||||
return ipa;
|
||||
|
||||
// Not an IP, lookup required
|
||||
IPAddress[] hosts = Dns.GetHostEntry(dnsAddress).AddressList;
|
||||
|
||||
foreach (IPAddress host in hosts)
|
||||
|
||||
Reference in New Issue
Block a user