Make texture decode errors nonfatal. The texture send is simply dropped

0.6.1-post-fixes
Melanie Thielker 2008-11-17 23:08:37 +00:00
parent 5972eb8848
commit ece27a3631
1 changed files with 34 additions and 26 deletions

View File

@ -176,44 +176,52 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{ {
ITextureSender sender = null; ITextureSender sender = null;
try // try
{ // {
while (true) while (true)
{ {
sender = m_queueSenders.Dequeue(); try
if (sender.Cancel)
{ {
TextureSent(sender); sender = m_queueSenders.Dequeue();
sender.Cancel = false; if (sender.Cancel)
}
else
{
bool finished = sender.SendTexturePacket();
if (finished)
{ {
TextureSent(sender); TextureSent(sender);
sender.Cancel = false;
} }
else else
{ {
m_queueSenders.Enqueue(sender); bool finished = sender.SendTexturePacket();
if (finished)
{
TextureSent(sender);
}
else
{
m_queueSenders.Enqueue(sender);
}
} }
// Make sure that any sender we currently have can get garbage collected
sender = null;
//m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count());
}
catch(Exception e)
{
m_log.ErrorFormat(
"[TEXTURE]: Texture send thread caught exception. The texture send was aborted. Exception is {0}", e);
} }
// Make sure that any sender we currently have can get garbage collected
sender = null;
//m_log.InfoFormat("[TEXTURE] Texture sender queue size: {0}", m_queueSenders.Count());
} }
} // }
catch (Exception e) // catch (Exception e)
{ // {
// TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened // // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
m_log.ErrorFormat( // m_log.ErrorFormat(
"[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}", // "[TEXTURE]: Texture send thread terminating with exception. PLEASE REBOOT YOUR SIM - TEXTURES WILL NOT BE AVAILABLE UNTIL YOU DO. Exception is {0}",
e); // e);
} // }
} }
/// <summary> /// <summary>