Stop IGridService from throwing a fatal exception when an IPEndPoint cannot be resolved, and add some handlers to deal with this cleanly; a condition was observed on OSGrid where a neighbouring region with an invalid (unresolveable) hostname would prevent a region from starting. This is bad.

This commit is contained in:
Tom Grimshaw
2010-05-29 01:03:59 -07:00
parent ea5bcc7b88
commit 2f409116db
8 changed files with 53 additions and 19 deletions

View File

@@ -259,9 +259,13 @@ namespace OpenSim.Services.Interfaces
}
catch (SocketException e)
{
throw new Exception(
/*throw new Exception(
"Unable to resolve local hostname " + m_externalHostName + " innerException of type '" +
e + "' attached to this exception", e);
e + "' attached to this exception", e);*/
// Don't throw a fatal exception here, instead, return Null and handle it in the caller.
// Reason is, on systems such as OSgrid it has occured that known hostnames stop
// resolving and thus make surrounding regions crash out with this exception.
return null;
}
return new IPEndPoint(ia, m_internalEndPoint.Port);