* Practise some defensive programming - gracefully terminate the thread if there is a problm in the world map module rather than bringing down the whole server.
parent
21c0df53a2
commit
97d320d7d1
|
@ -389,6 +389,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
|||
/// Processing thread main() loop for doing remote mapitem requests
|
||||
/// </summary>
|
||||
public void process()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
@ -414,8 +416,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
|||
RequestMapItemsCompleted(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[WorldMap]: Map item request thread terminated abnormally with exception {0}", e);
|
||||
}
|
||||
|
||||
threadrunning = false;
|
||||
m_log.Warn("[WorldMap]: Remote request thread exiting");
|
||||
m_log.Debug("[WorldMap]: Remote request thread exiting");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARThY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
|||
catch (Exception e)
|
||||
{
|
||||
if (lastScriptEngine != null)
|
||||
lastScriptEngine.Log.WarnFormat("[{0}]: Exception {1} thrown", ScriptEngineName, e.GetType().ToString());
|
||||
lastScriptEngine.Log.ErrorFormat("[{0}]: Exception {1} thrown", ScriptEngineName, e.GetType().ToString());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue