* Stop the crash to bash of the entire region server when a client thread fails by catching the exception in AuthUser() instead of letting it propogate out of the thread

0.6.0-stable
Justin Clarke Casey 2008-06-03 20:27:52 +00:00
parent 48322cec96
commit a987840191
1 changed files with 36 additions and 22 deletions

View File

@ -688,7 +688,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_scene.AddNewClient(this, true);
}
/// <summary>
/// Authorize an incoming user session. This method lies at the base of the entire client thread.
/// </summary>
protected virtual void AuthUser()
{
try
{
// AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(m_cirpack.m_circuitCode.m_sessionId, m_cirpack.m_circuitCode.ID, m_cirpack.m_circuitCode.Code);
AuthenticateResponse sessionInfo =
@ -718,6 +723,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ClientLoop();
}
}
catch (Exception e)
{
// Don't let a failure in an individual client thread crash the whole sim.
// FIXME: possibly more sophisticated cleanup since leaving client resources around will
// probably cause long term instability. I think this is still better than bring down the whole
// region
m_log.ErrorFormat("[CLIENT]: Client thread for {0} {1} crashed. Exception {2}", Name, AgentId, e);
}
}
# endregion