From 857535550cdfc07c8ef985f71342f26d39723499 Mon Sep 17 00:00:00 2001 From: diva Date: Wed, 24 Dec 2008 00:03:33 +0000 Subject: Better error handling for expect_hg_user on the HG. --- OpenSim/Region/Communications/Hypergrid/HGGridServices.cs | 11 ++++++++++- .../Region/Communications/Hypergrid/HGGridServicesGridMode.cs | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs index 56a8912..fa29460 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs @@ -620,7 +620,16 @@ namespace OpenSim.Region.Communications.Hypergrid string uri = "http://" + regInfo.ExternalHostName + ":" + regInfo.HttpPort + "/"; //Console.WriteLine("XXX uri: " + uri); XmlRpcRequest request = new XmlRpcRequest("expect_hg_user", SendParams); - XmlRpcResponse reply = request.Send(uri, 6000); + XmlRpcResponse reply; + try + { + reply = request.Send(uri, 6000); + } + catch (Exception e) + { + m_log.Warn("[HGrid]: Failed to notify region about user. Reason: " + e.Message); + return false; + } if (!reply.IsFault) { diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs index f45c484..58ec27e 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs @@ -237,7 +237,8 @@ namespace OpenSim.Region.Communications.Hypergrid Console.WriteLine("XXX Going local-grid region XXX"); RegionInfo regInfo = RequestNeighbourInfo(regionHandle); if (regInfo != null) - InformRegionOfUser(regInfo, agentData); + if (!InformRegionOfUser(regInfo, agentData)) + return false; return m_remoteBackend.InformRegionOfChildAgent(regionHandle, agentData); } -- cgit v1.1