From ed9cdbe99f8c108925417e53f7cf85bff4434491 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 25 Mar 2008 19:39:41 +0000 Subject: [PATCH] * Temporary hack to swallow neighbour contact problems on startup (in response to osgrid issues) * Not sure what the effect will be, but can't be any worse than the current constant sim crashes. --- .../Region/Communications/OGS1/OGS1GridServices.cs | 12 +++++++++++- .../Environment/Scenes/SceneCommunicationService.cs | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 23b8fb41b2..a783050b92 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -226,7 +226,17 @@ namespace OpenSim.Region.Communications.OGS1 uint port = Convert.ToUInt32(neighbourData["sim_port"]); string externalUri = (string) neighbourData["sim_uri"]; - string externalIpStr = Util.GetHostFromDNS(simIp).ToString(); + string externalIpStr = String.Empty; + try + { + externalIpStr = Util.GetHostFromDNS(simIp).ToString(); + } + catch (SocketException e) + { + m_log.WarnFormat("RequestNeighbours(): Lookup of neighbour {0} failed! Not including in neighbours list"); + continue; + } + SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 318b04afc6..2f81192bb3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -296,7 +296,10 @@ namespace OpenSim.Region.Environment.Scenes // FIXME: Okay, even though we've failed, we're still going to throw the exception on, // since I don't know what will happen if we just let the client continue - throw e; + + // XXX: Well, decided to swallow the exception instead for now. Let us see how that goes. + // throw e; + } } }