* Attaches debug info to some DNS resolution code.

0.6.6-post-fixes
Adam Frisby 2009-05-25 06:46:41 +00:00
parent d4957dd9be
commit a38285f7f9
1 changed files with 16 additions and 8 deletions

View File

@ -134,7 +134,8 @@ namespace OpenSim.Framework
// Reset for next check
ia = null;
try
{
foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
{
if (ia == null)
@ -146,6 +147,13 @@ namespace OpenSim.Framework
break;
}
}
}
catch (SocketException e)
{
throw new Exception(
"Unable to resolve local hostname " + m_externalHostName + " innerException of type '" +
e + "' attached to this exception", e);
}
return new IPEndPoint(ia, m_internalEndPoint.Port);
}