Make friend notifies and closing child agents async because both can

block the heartbeat thread if the sim being contacted is unresponsive
avinationmerge
Melanie 2012-09-04 22:53:52 +02:00
parent 8a537f8f66
commit 9ae293881a
3 changed files with 45 additions and 40 deletions

View File

@ -3432,7 +3432,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="e"></param>
public void PhysicsCollisionUpdate(EventArgs e)
{
if (IsChildAgent)
if (IsChildAgent || Animator == null)
return;
//if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))

View File

@ -144,10 +144,11 @@ namespace OpenSim.Services.Connectors.Friends
private bool Call(GridRegion region, Dictionary<string, object> sendData)
{
Util.FireAndForget(x => {
string reqString = ServerUtils.BuildQueryString(sendData);
//m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: queryString = {0}", reqString);
if (region == null)
return false;
return;
string path = ServicePath();
if (!region.ServerURI.EndsWith("/"))
@ -164,10 +165,10 @@ namespace OpenSim.Services.Connectors.Friends
if (replyData.ContainsKey("RESULT"))
{
if (replyData["RESULT"].ToString().ToLower() == "true")
return true;
else
return false;
// if (replyData["RESULT"].ToString().ToLower() == "true")
// return;
// else
return;
}
else
m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: reply data does not contain result field");
@ -181,7 +182,10 @@ namespace OpenSim.Services.Connectors.Friends
m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message);
}
return false;
return;
});
return true;
}
}
}

View File

@ -395,7 +395,7 @@ 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() + "/";
try
@ -406,6 +406,7 @@ namespace OpenSim.Services.Connectors.Simulation
{
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString());
}
});
return true;
}