From 9ae293881addf98844b8f292298bc0674ebbed0d Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 4 Sep 2012 22:53:52 +0200 Subject: Make friend notifies and closing child agents async because both can block the heartbeat thread if the sim being contacted is unresponsive --- .../Simulation/SimulationServiceConnector.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index e1c2243..508baf7 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -395,17 +395,18 @@ namespace OpenSim.Services.Connectors.Simulation private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) { // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); + Util.FireAndForget(x => { + string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; - string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; - - try - { - WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); - } - catch (Exception e) - { - m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); - } + try + { + WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); + } + catch (Exception e) + { + m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); + } + }); return true; } -- cgit v1.1