Forgot to check in prebuild.xml on sat, see someone already did :)

Fix in DNS resolve
afrisby
Tedd Hansen 2007-09-17 08:06:20 +00:00
parent df58154781
commit 8792645e0d
1 changed files with 10 additions and 2 deletions

View File

@ -61,8 +61,16 @@ namespace OpenSim.Framework.Types
// Old one defaults to IPv6
//return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port );
// New method favors IPv4
IPAddress ia = null;
// If it is already an IP, don't resolve it - just return directly
if (IPAddress.TryParse(m_externalHostName, out ia))
return new IPEndPoint(ia, m_internalEndPoint.Port);
// Reset for next check
ia = null;
// New method favors IPv4
foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
{
if (ia == null)